It's even worse than I thought.
Octal constants don't work AT ALL in the compiler.
I tried
class junk {
static public void main(String argv[]) {
int i = 01;
int j = 02;
int k = 0100;
System.out.println(i + " " + j + " " + k);
}
}
and it printed out "0 0 0"
This is unacceptable, and in those circumstances that I need to be using octal
constants, saying that I should use decimal constants instead isn't a reasonable
workaround.
Octal constants don't work AT ALL in the compiler.
I tried
class junk {
static public void main(String argv[]) {
int i = 01;
int j = 02;
int k = 0100;
System.out.println(i + " " + j + " " + k);
}
}
and it printed out "0 0 0"
This is unacceptable, and in those circumstances that I need to be using octal
constants, saying that I should use decimal constants instead isn't a reasonable
workaround.
- duplicates
-
JDK-1185861 0000 not recognized as a constant
- Closed