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

  • <small id='7he6R'></small><noframes id='7he6R'>

    <legend id='7he6R'><style id='7he6R'><dir id='7he6R'><q id='7he6R'></q></dir></style></legend>

  • <i id='7he6R'><tr id='7he6R'><dt id='7he6R'><q id='7he6R'><span id='7he6R'><b id='7he6R'><form id='7he6R'><ins id='7he6R'></ins><ul id='7he6R'></ul><sub id='7he6R'></sub></form><legend id='7he6R'></legend><bdo id='7he6R'><pre id='7he6R'><center id='7he6R'></center></pre></bdo></b><th id='7he6R'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7he6R'><tfoot id='7he6R'></tfoot><dl id='7he6R'><fieldset id='7he6R'></fieldset></dl></div>

      <tfoot id='7he6R'></tfoot>
          <bdo id='7he6R'></bdo><ul id='7he6R'></ul>

        為什么 Integer.MAX_VALUE + 1 == Integer.MIN_VALUE?

        why Integer.MAX_VALUE + 1 == Integer.MIN_VALUE?(為什么 Integer.MAX_VALUE + 1 == Integer.MIN_VALUE?)
          <tbody id='7ByNU'></tbody>
          <bdo id='7ByNU'></bdo><ul id='7ByNU'></ul>

            <small id='7ByNU'></small><noframes id='7ByNU'>

                  <legend id='7ByNU'><style id='7ByNU'><dir id='7ByNU'><q id='7ByNU'></q></dir></style></legend>

                1. <tfoot id='7ByNU'></tfoot>
                2. <i id='7ByNU'><tr id='7ByNU'><dt id='7ByNU'><q id='7ByNU'><span id='7ByNU'><b id='7ByNU'><form id='7ByNU'><ins id='7ByNU'></ins><ul id='7ByNU'></ul><sub id='7ByNU'></sub></form><legend id='7ByNU'></legend><bdo id='7ByNU'><pre id='7ByNU'><center id='7ByNU'></center></pre></bdo></b><th id='7ByNU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7ByNU'><tfoot id='7ByNU'></tfoot><dl id='7ByNU'><fieldset id='7ByNU'></fieldset></dl></div>
                  本文介紹了為什么 Integer.MAX_VALUE + 1 == Integer.MIN_VALUE?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  System.out.println(Integer.MAX_VALUE + 1 == Integer.MIN_VALUE);

                  是真的.

                  我知道 Java 中的整數(shù)是 32 位的,不能超過 231-1,但我不明白為什么在其 MAX_VALUE 結(jié)果中加 1在 MIN_VALUE 而不是某種異常.更不用說像 Ruby 那樣將透明轉(zhuǎn)換為更大的類型.

                  I understand that integer in Java is 32 bit and can't go above 231-1, but I can't understand why adding 1 to its MAX_VALUE results in MIN_VALUE and not in some kind of exception. Not mentioning something like transparent conversion to a bigger type, like Ruby does.

                  此行為是否在某處指定?我可以依賴它嗎?

                  Is this behavior specified somewhere? Can I rely on it?

                  推薦答案

                  因?yàn)檎麛?shù)溢出.當(dāng)它溢出時,下一個值是 Integer.MIN_VALUE.相關(guān)JLS

                  Because the integer overflows. When it overflows, the next value is Integer.MIN_VALUE. Relevant JLS

                  如果整數(shù)加法溢出,則結(jié)果是數(shù)學(xué)和的低位,以某種足夠大的二進(jìn)制補(bǔ)碼格式表示.如果發(fā)生溢出,則結(jié)果的符號與兩個操作數(shù)值的數(shù)學(xué)和的符號不同.

                  If an integer addition overflows, then the result is the low-order bits of the mathematical sum as represented in some sufficiently large two's-complement format. If overflow occurs, then the sign of the result is not the same as the sign of the mathematical sum of the two operand values.

                  這篇關(guān)于為什么 Integer.MAX_VALUE + 1 == Integer.MIN_VALUE?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲為 int?)
                3. <i id='USPe5'><tr id='USPe5'><dt id='USPe5'><q id='USPe5'><span id='USPe5'><b id='USPe5'><form id='USPe5'><ins id='USPe5'></ins><ul id='USPe5'></ul><sub id='USPe5'></sub></form><legend id='USPe5'></legend><bdo id='USPe5'><pre id='USPe5'><center id='USPe5'></center></pre></bdo></b><th id='USPe5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='USPe5'><tfoot id='USPe5'></tfoot><dl id='USPe5'><fieldset id='USPe5'></fieldset></dl></div>
                      <bdo id='USPe5'></bdo><ul id='USPe5'></ul>

                            <tbody id='USPe5'></tbody>
                        • <legend id='USPe5'><style id='USPe5'><dir id='USPe5'><q id='USPe5'></q></dir></style></legend>

                          • <small id='USPe5'></small><noframes id='USPe5'>

                            <tfoot id='USPe5'></tfoot>
                          • 主站蜘蛛池模板: 欧美自拍日韩 | 免费在线观看一区二区 | 日韩欧美一区二区三区在线播放 | 三级黄色大片网站 | 欧美精品第一区 | 请别相信他免费喜剧电影在线观看 | 欧美视频一区二区三区 | 国产网站在线免费观看 | 高清亚洲 | 亚洲午夜精品久久久久久app | 国产精品福利在线观看 | 国产高清视频一区 | 国产精品久久久久久久久久久久久 | 97超碰站 | 国产欧美在线 | 99精品久久 | 天啪| 一级黄在线观看 | 在线视频h | 亚洲国产中文字幕 | 亚洲图片一区二区三区 | 在线国产小视频 | 亚洲视频三 | 色.com | 精品国产乱码久久久久久蜜退臀 | 久久久精品一区二区 | 国产探花在线精品一区二区 | 亚洲免费人成在线视频观看 | 九九精品在线 | 91色视频在线观看 | 欧美性猛交一区二区三区精品 | 麻豆精品国产免费 | 国产精品久久久久影院色老大 | 超碰在线免费公开 | 午夜影院在线 | 三级免费 | 中文字幕av一区 | 国产激情在线 | 国产欧美一区二区三区日本久久久 | 日韩一区二区三区av | 午夜影院在线视频 |