pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="eganbz3" 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="23q8v3y" 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="rf8trqr" 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'>

                            主站蜘蛛池模板: 智能化的检漏仪_气密性测试仪_流量测试仪_流阻阻力测试仪_呼吸管快速检漏仪_连接器防水测试仪_车载镜头测试仪_奥图自动化科技 | 涡轮流量计_LWGY智能气体液体电池供电计量表-金湖凯铭仪表有限公司 | 嘉兴恒升声级计-湖南衡仪声级计-杭州爱华多功能声级计-上海邦沃仪器设备有限公司 | 焊接烟尘净化器__焊烟除尘设备_打磨工作台_喷漆废气治理设备 -催化燃烧设备 _天津路博蓝天环保科技有限公司 | 企业管理培训,企业培训公开课,企业内训课程,企业培训师 - 名课堂企业管理培训网 | 济南品牌包装设计公司_济南VI标志设计公司_山东锐尚文化传播 | 江苏南京多语种翻译-专业翻译公司报价-正规商务翻译机构-南京华彦翻译服务有限公司 | 集装箱标准养护室-集装箱移动式养护室-广州璟业试验仪器有限公司 | 空调风机,低噪声离心式通风机,不锈钢防爆风机,前倾皮带传动风机,后倾空调风机-山东捷风风机有限公司 | 工业冷却塔维修厂家_方形不锈钢工业凉水塔维修改造方案-广东康明节能空调有限公司 | 鑫铭东办公家具一站式定制采购-深圳办公家具厂家直销 | 复合土工膜厂家|hdpe防渗土工膜|复合防渗土工布|玻璃纤维|双向塑料土工格栅-安徽路建新材料有限公司 | 威廉希尔WilliamHill·足球(中国)体育官方网站 | 施工电梯_齿条货梯_烟囱电梯_物料提升机-河南大诚机械制造有限公司 | 石膏基自流平砂浆厂家-高强石膏基保温隔声自流平-轻质抹灰石膏粉砂浆批发-永康市汇利建设有限公司 | 回转窑-水泥|石灰|冶金-巩义市瑞光金属制品有限责任公司 | 磨煤机配件-高铬辊套-高铬衬板-立磨辊套-盐山县宏润电力设备有限公司 | 沥青车辙成型机-车托式混凝土取芯机-混凝土塑料试模|鑫高仪器 | 高通量组织研磨仪-多样品组织研磨仪-全自动组织研磨仪-研磨者科技(广州)有限公司 | 高压绝缘垫-红色配电房绝缘垫-绿色高压绝缘地毯-上海苏海电气 | 快速卷帘门_硬质快速卷帘门-西朗门业 | 东莞喷砂机-喷砂机-喷砂机配件-喷砂器材-喷砂加工-东莞市协帆喷砂机械设备有限公司 | 德国EA可编程直流电源_电子负载,中国台湾固纬直流电源_交流电源-苏州展文电子科技有限公司 | 搪瓷搅拌器,搪玻璃搅拌器,搪玻璃冷凝器_厂家-淄博越宏化工设备 | 两头忙,井下装载机,伸缩臂装载机,30装载机/铲车,50装载机/铲车厂家_价格-莱州巨浪机械有限公司 | 动库网动库商城-体育用品专卖店:羽毛球,乒乓球拍,网球,户外装备,运动鞋,运动包,运动服饰专卖店-正品运动品网上商城动库商城网 - 动库商城 | 金属切削液-脱水防锈油-电火花机油-抗磨液压油-深圳市雨辰宏业科技发展有限公司 | 锌合金压铸-铝合金压铸厂-压铸模具-冷挤压-誉格精密压铸 | 帽子厂家_帽子工厂_帽子定做_义乌帽厂_帽厂_制帽厂_帽子厂_浙江高普制帽厂 | 化工ERP软件_化工新材料ERP系统_化工新材料MES软件_MES系统-广东顺景软件科技有限公司 | 液压油缸生产厂家-山东液压站-济南捷兴液压机电设备有限公司 | 可程式恒温恒湿试验箱|恒温恒湿箱|恒温恒湿试验箱|恒温恒湿老化试验箱|高低温试验箱价格报价-广东德瑞检测设备有限公司 | 大型冰雕-景区冰雕展制作公司,3D创意设计源头厂家-[赛北冰雕] | 蔡司三坐标-影像测量机-3D扫描仪-蔡司显微镜-扫描电镜-工业CT-ZEISS授权代理商三本工业测量 | 桨叶搅拌机_螺旋挤压/方盒旋切造粒机厂家-无锡市鸿诚输送机械有限公司 | 工控机-工业平板电脑-研华工控机-研越无风扇嵌入式box工控机 | 废水处理-废气处理-工业废水处理-工业废气处理工程-深圳丰绿环保废气处理公司 | 会议会展活动拍摄_年会庆典演出跟拍_摄影摄像直播-艾木传媒 | 洁净化验室净化工程_成都实验室装修设计施工_四川华锐净化公司 | 空调风机,低噪声离心式通风机,不锈钢防爆风机,前倾皮带传动风机,后倾空调风机-山东捷风风机有限公司 | 设定时间记录电子秤-自动累计储存电子秤-昆山巨天仪器设备有限公司 |