They think it is:
Possible Duplicate:
Integer with leading zeroes
But if you check Integer with leading zeroes then you will find that the question is asked if before the launch of jdk7 and therefore it has lower researching efforts. But in jdk7 there is some change and addition to the integers. Here are the answers which are up to date covering jdk7.
I've a code:
class Test{
public static void main(String[] args){
int x=09;
System.out.println(x);
}
}
On compilation it gives an error: integer number too large : 09
Why it do so?
Again, if I change the code to:
class Test{
public static void main(String[] args){
int x=012;
System.out.println(x);
}
}
Now the output is 10
Why it give the output 10 instead of 12?