gpt4 book ai didi

java - 00在Java中是整数还是八进制?

转载 作者:搜寻专家 更新时间:2023-10-31 08:22:49 25 4
gpt4 key购买 nike

00, 000, or 000...

Java 中的整数?还是八进制?如果是八进制是

001 or 0005

八进制?

最佳答案

都是整数,但是...

1  is decimal
0 is decimal
01 is octal
00 is octal

来自 Java Language Specification (强调我的):

Note that octal numerals always consist of two or more digits; 0 is always considered to be a decimal numeral - not that it matters much in practice, for the numerals 0, 00, and 0x0 all represent exactly the same integer value.

关于java - 00在Java中是整数还是八进制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24031843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com