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

        <bdo id='XatlB'></bdo><ul id='XatlB'></ul>
      1. <small id='XatlB'></small><noframes id='XatlB'>

        <i id='XatlB'><tr id='XatlB'><dt id='XatlB'><q id='XatlB'><span id='XatlB'><b id='XatlB'><form id='XatlB'><ins id='XatlB'></ins><ul id='XatlB'></ul><sub id='XatlB'></sub></form><legend id='XatlB'></legend><bdo id='XatlB'><pre id='XatlB'><center id='XatlB'></center></pre></bdo></b><th id='XatlB'></th></span></q></dt></tr></i><div id='XatlB'><tfoot id='XatlB'></tfoot><dl id='XatlB'><fieldset id='XatlB'></fieldset></dl></div>
        <legend id='XatlB'><style id='XatlB'><dir id='XatlB'><q id='XatlB'></q></dir></style></legend>

        为什么选择“010"?等于 8?

        Why quot;010quot; equals 8?(为什么选择“010?等于 8?)
          <tbody id='5C7Kf'></tbody>

        • <bdo id='5C7Kf'></bdo><ul id='5C7Kf'></ul>

          <small id='5C7Kf'></small><noframes id='5C7Kf'>

            <tfoot id='5C7Kf'></tfoot>

              1. <i id='5C7Kf'><tr id='5C7Kf'><dt id='5C7Kf'><q id='5C7Kf'><span id='5C7Kf'><b id='5C7Kf'><form id='5C7Kf'><ins id='5C7Kf'></ins><ul id='5C7Kf'></ul><sub id='5C7Kf'></sub></form><legend id='5C7Kf'></legend><bdo id='5C7Kf'><pre id='5C7Kf'><center id='5C7Kf'></center></pre></bdo></b><th id='5C7Kf'></th></span></q></dt></tr></i><div id='5C7Kf'><tfoot id='5C7Kf'></tfoot><dl id='5C7Kf'><fieldset id='5C7Kf'></fieldset></dl></div>

                <legend id='5C7Kf'><style id='5C7Kf'><dir id='5C7Kf'><q id='5C7Kf'></q></dir></style></legend>
                • 本文介绍了为什么选择“010"?等于 8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的简单问题是为什么:

                  My simple question is why:

                  System.out.println(010|4);
                  

                  打印12"?我了解按位或运算符,但为什么010"等于 8?肯定不是恭维2的通知,那这个数字怎么解码呢?

                  prints "12"? I understand bitwise OR operator but why "010" equals 8? It's definitely not compliment 2's notification, so how to decode this number?

                  推荐答案

                  看看Java 语言规范,第 3.10.1 章整数文字

                  整数字面量可以用十进制(以 10 为底)、十六进制表示(以 16 为底)、八进制(以 8 为底) 或二进制(以 2 为底).

                  An integer literal may be expressed in decimal (base 10), hexadecimal (base 16), octal (base 8), or binary (base 2).

                  [...]

                  八进制数字由 ASCII 数字 0 后跟一个或多个ASCII 数字 0 到 7 之间穿插下划线,并且可以表示正整数、零整数或负整数.

                  An octal numeral consists of an ASCII digit 0 followed by one or more of the ASCII digits 0 through 7 interspersed with underscores, and can represent a positive, zero, or negative integer.

                  现在你应该明白为什么0108了.

                  Now you should understand why 010 is 8.

                  这篇关于为什么选择“010"?等于 8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                    <i id='lTK7w'><tr id='lTK7w'><dt id='lTK7w'><q id='lTK7w'><span id='lTK7w'><b id='lTK7w'><form id='lTK7w'><ins id='lTK7w'></ins><ul id='lTK7w'></ul><sub id='lTK7w'></sub></form><legend id='lTK7w'></legend><bdo id='lTK7w'><pre id='lTK7w'><center id='lTK7w'></center></pre></bdo></b><th id='lTK7w'></th></span></q></dt></tr></i><div id='lTK7w'><tfoot id='lTK7w'></tfoot><dl id='lTK7w'><fieldset id='lTK7w'></fieldset></dl></div>

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

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

                    <tfoot id='lTK7w'></tfoot>
                    • <bdo id='lTK7w'></bdo><ul id='lTK7w'></ul>
                          <tbody id='lTK7w'></tbody>