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

<legend id='gK6e5'><style id='gK6e5'><dir id='gK6e5'><q id='gK6e5'></q></dir></style></legend>

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

      <bdo id='gK6e5'></bdo><ul id='gK6e5'></ul>

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

      <tfoot id='gK6e5'></tfoot>
      1. value &amp; 是什么意思?0xff 在 Java 中做什么?

        What does value amp; 0xff do in Java?(value amp; 是什么意思?0xff 在 Java 中做什么?)

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

            <bdo id='JpX6y'></bdo><ul id='JpX6y'></ul>

                <legend id='JpX6y'><style id='JpX6y'><dir id='JpX6y'><q id='JpX6y'></q></dir></style></legend>

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

                  本文介紹了value &amp; 是什么意思?0xff 在 Java 中做什么?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有以下 Java 代碼:

                  I have the following Java code:

                  byte value = 0xfe; // corresponds to -2 (signed) and 254 (unsigned)
                  int result = value & 0xff;
                  

                  打印時的結果是 254,但我不知道這段代碼是如何工作的.如果 & 運算符只是按位操作,那么為什么它不會產生一個字節而是一個整數呢?

                  The result is 254 when printed, but I have no idea how this code works. If the & operator is simply bitwise, then why does it not result in a byte and instead an integer?

                  推薦答案

                  它將 result 設置為將 value 的 8 位放入result 的最低 8 位.

                  It sets result to the (unsigned) value resulting from putting the 8 bits of value in the lowest 8 bits of result.

                  之所以需要這樣的東西是因為 byte 在 Java 中是一個有符號類型.如果你只是寫:

                  The reason something like this is necessary is that byte is a signed type in Java. If you just wrote:

                  int result = value;
                  

                  然后 result 將以 ff ff ff fe 值結束,而不是 00 00 00 fe.更微妙的是,& 被定義為僅對 int1 進行操作,所以發生的情況是:

                  then result would end up with the value ff ff ff fe instead of 00 00 00 fe. A further subtlety is that the & is defined to operate only on int values1, so what happens is:

                  1. value 被提升為 int (ff ff ff fe).
                  2. 0xffint 文字(00 00 00 ff).
                  3. 應用 & 以產生 result 的所需值.
                  1. value is promoted to an int (ff ff ff fe).
                  2. 0xff is an int literal (00 00 00 ff).
                  3. The & is applied to yield the desired value for result.

                  (關鍵是轉換為 int 發生在 應用 & 運算符之前.)

                  (The point is that conversion to int happens before the & operator is applied.)

                  1嗯,不完全是.如果任一操作數是 long& 運算符也適用于 long 值.但不在 byte 上.請參閱 Java 語言規范, 部分15.22.1 和 5.6.2.

                  1Well, not quite. The & operator works on long values as well, if either operand is a long. But not on byte. See the Java Language Specification, sections 15.22.1 and 5.6.2.

                  這篇關于value &amp; 是什么意思?0xff 在 Java 中做什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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?)

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

                      <tbody id='P6nDc'></tbody>
                      • <i id='P6nDc'><tr id='P6nDc'><dt id='P6nDc'><q id='P6nDc'><span id='P6nDc'><b id='P6nDc'><form id='P6nDc'><ins id='P6nDc'></ins><ul id='P6nDc'></ul><sub id='P6nDc'></sub></form><legend id='P6nDc'></legend><bdo id='P6nDc'><pre id='P6nDc'><center id='P6nDc'></center></pre></bdo></b><th id='P6nDc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='P6nDc'><tfoot id='P6nDc'></tfoot><dl id='P6nDc'><fieldset id='P6nDc'></fieldset></dl></div>
                        • <bdo id='P6nDc'></bdo><ul id='P6nDc'></ul>
                            <tfoot id='P6nDc'></tfoot>
                            <legend id='P6nDc'><style id='P6nDc'><dir id='P6nDc'><q id='P6nDc'></q></dir></style></legend>
                            主站蜘蛛池模板: 免费高清成人 | 罗宾被扒开腿做同人网站 | 欧美在线视频一区 | 精品三级在线观看 | 欧美在线视频观看 | 男女啪啪高潮无遮挡免费动态 | 999国产精品视频 | 欧洲一区二区三区 | 精品国产青草久久久久福利 | 2019天天操| 一区二区三区视频在线观看 | 国产成人福利在线 | 亚洲视频一区二区三区四区 | 婷婷丁香在线视频 | 久久久激情 | 亚洲精品欧美 | 欧美9999| 精品久久久久久亚洲综合网站 | 久久国产精品久久国产精品 | 自拍 亚洲 欧美 老师 丝袜 | 91porn成人精品 | 男插女下体视频 | 欧美性一区二区三区 | 91视频入口| 久久精品欧美一区二区三区不卡 | 中文字幕日韩欧美一区二区三区 | 欧美二区在线 | 免费看黄视频网站 | 中文字幕在线观看国产 | 我要看一级片 | 免费xxxx大片国产在线 | 99在线免费观看视频 | 欧美日韩国产高清 | 午夜电影日韩 | 国内精品久久久久久 | 精品1区2区3区 | 欧美一级淫片免费视频黄 | 伊人久久综合影院 | 中文字幕日本一区二区 | 人干人操| 中文在线一区二区 |