int x = 100_000_5; System.out.println(x);
Instead of throwing an error it prints the result 1000005. If this is a valid case what other abnormalities are there with Integer?
int x = 100_000_5; System.out.println(x);
Instead of throwing an error it prints the result 1000005. If this is a valid case what other abnormalities are there with Integer?
int x = 100_000_5
is same as int x = 1000005
. JVM7 allows to write literals with more readable format, e.g. separate groups.
See more in Primitive Data Types