我和我的朋友在看到它和答案后对Java中的这个说法感到困惑。
这是如何运作的?
System.out.printf("%d", 077);
等于63?
077
is an octal number http://en.wikipedia.org/wiki/Octal which equals 7 x 81 + 7 x 80 which is 63
decimal. To display the octal value you could do
System.out.printf("%o", 077);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)