【发布时间】:2014-12-19 03:23:58
【问题描述】:
public static void main (String[] args) {
int a = 0010;
String num = Integer.toString(a);
System.out.println(num);
}
为什么打印的是 8 而不是 0010?
【问题讨论】:
-
关于这个问题的许多变体在这里 - 参见例如stackoverflow.com/questions/24031843/…