久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='2iIwW'><tr id='2iIwW'><dt id='2iIwW'><q id='2iIwW'><span id='2iIwW'><b id='2iIwW'><form id='2iIwW'><ins id='2iIwW'></ins><ul id='2iIwW'></ul><sub id='2iIwW'></sub></form><legend id='2iIwW'></legend><bdo id='2iIwW'><pre id='2iIwW'><center id='2iIwW'></center></pre></bdo></b><th id='2iIwW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2iIwW'><tfoot id='2iIwW'></tfoot><dl id='2iIwW'><fieldset id='2iIwW'></fieldset></dl></div>
    1. <legend id='2iIwW'><style id='2iIwW'><dir id='2iIwW'><q id='2iIwW'></q></dir></style></legend>
      <tfoot id='2iIwW'></tfoot>

      <small id='2iIwW'></small><noframes id='2iIwW'>

          <bdo id='2iIwW'></bdo><ul id='2iIwW'></ul>

        如何在 Java 中將 int 轉換為 Long?

        How do I convert from int to Long in Java?(如何在 Java 中將 int 轉換為 Long?)
          <bdo id='XZYcu'></bdo><ul id='XZYcu'></ul>

            <tbody id='XZYcu'></tbody>
          1. <small id='XZYcu'></small><noframes id='XZYcu'>

          2. <legend id='XZYcu'><style id='XZYcu'><dir id='XZYcu'><q id='XZYcu'></q></dir></style></legend>

            <tfoot id='XZYcu'></tfoot>

                <i id='XZYcu'><tr id='XZYcu'><dt id='XZYcu'><q id='XZYcu'><span id='XZYcu'><b id='XZYcu'><form id='XZYcu'><ins id='XZYcu'></ins><ul id='XZYcu'></ul><sub id='XZYcu'></sub></form><legend id='XZYcu'></legend><bdo id='XZYcu'><pre id='XZYcu'><center id='XZYcu'></center></pre></bdo></b><th id='XZYcu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XZYcu'><tfoot id='XZYcu'></tfoot><dl id='XZYcu'><fieldset id='XZYcu'></fieldset></dl></div>
                  本文介紹了如何在 Java 中將 int 轉換為 Long?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我一直在這里和谷歌上發現從 longint 而不是相反的問題.但我確信在從 intLong 之前遇到這種情況的人不止我一個.

                  I keep finding both on here and Google people having troubles going from long to int and not the other way around. Yet I'm sure I'm not the only one that has run into this scenario before going from int to Long.

                  我發現的唯一其他答案是首先將其設置為 Long",這確實沒有解決問題.

                  The only other answers I've found were "Just set it as Long in the first place" which really doesn't address the question.

                  我最初嘗試強制轉換,但得到Cannot cast from int to Long"

                  I initially tried casting but I get a "Cannot cast from int to Long"

                  for (int i = 0; i < myArrayList.size(); ++i ) {
                      content = new Content();
                      content.setDescription(myArrayList.get(i));
                      content.setSequence((Long) i);
                      session.save(content);
                  }
                  

                  你可以想象我有點困惑,我被困在使用 int 因為一些內容是作為一個 ArrayList 和我的實體進入的m 存儲此信息需要序列號為 Long.

                  As you can imagine I'm a little perplexed, I'm stuck using int since some content is coming in as an ArrayList and the entity for which I'm storing this info requires the sequence number as a Long.

                  推薦答案

                  請注意,轉換為 long 和轉換為 Long 之間存在差異.如果你轉換成 long (一個原始值),那么它應該被自動裝箱成一個 Long (包裝它的引用類型).

                  Note that there is a difference between a cast to long and a cast to Long. If you cast to long (a primitive value) then it should be automatically boxed to a Long (the reference type that wraps it).

                  您也可以使用 new 創建 Long 的實例,并使用 int 值對其進行初始化.

                  You could alternatively use new to create an instance of Long, initializing it with the int value.

                  這篇關于如何在 Java 中將 int 轉換為 Long?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                        <tbody id='nH5eG'></tbody>

                      <i id='nH5eG'><tr id='nH5eG'><dt id='nH5eG'><q id='nH5eG'><span id='nH5eG'><b id='nH5eG'><form id='nH5eG'><ins id='nH5eG'></ins><ul id='nH5eG'></ul><sub id='nH5eG'></sub></form><legend id='nH5eG'></legend><bdo id='nH5eG'><pre id='nH5eG'><center id='nH5eG'></center></pre></bdo></b><th id='nH5eG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nH5eG'><tfoot id='nH5eG'></tfoot><dl id='nH5eG'><fieldset id='nH5eG'></fieldset></dl></div>
                    1. <legend id='nH5eG'><style id='nH5eG'><dir id='nH5eG'><q id='nH5eG'></q></dir></style></legend>

                      1. <tfoot id='nH5eG'></tfoot>

                        • <bdo id='nH5eG'></bdo><ul id='nH5eG'></ul>

                          <small id='nH5eG'></small><noframes id='nH5eG'>

                            主站蜘蛛池模板: 国产极品粉嫩美女呻吟在线看人 | 亚洲乱码国产乱码精品精的特点 | 国产一二三区免费视频 | 色欧美片视频在线观看 | 日韩黄色小视频 | 91av亚洲| 色橹橹欧美在线观看视频高清 | 欧美一区二区三区在线播放 | 丁香五月网久久综合 | 亚洲成人网在线 | 欧美乱淫视频 | 亚洲一区二区三区在线播放 | 亚洲一区二区三区视频在线 | 在线观看av中文字幕 | 中文字字幕一区二区三区四区五区 | 国产久 | 色橹橹欧美在线观看视频高清 | 日韩精品视频在线观看一区二区三区 | 欧美a在线| 在线视频一区二区三区 | www狠狠爱com | 日韩精品影院 | 911网站大全在线观看 | av手机在线播放 | 中文在线日韩 | 国产一区免费 | 中文字幕一级毛片视频 | 毛片大全 | 日日草夜夜草 | 中文字幕国产精品 | 精品一区精品二区 | 精品乱码一区二区三四区 | 欧美一级黄 | 天天插日日操 | 欧美aⅴ | 欧美www在线 | 欧美亚洲另类在线 | 亚洲综合久久久 | 黑人巨大精品欧美一区二区一视频 | 色婷婷一区 | 黄色一级大片在线免费看产 |