In Java SE 7, any number of underscore characters (_) can appear anywhere between digits in a numerical literal.
This feature is used to separate groups of digits in numeric literals, which can improve the readability of your code.
We cannot place underscores in the following places:
1. At the beginning or end of a number
2. Adjacent to a decimal point in a floating point literal
3. Prior to an F or L suffix
4. In positions where a string of digits is expected.
float pi1 = 3_.1415F;
float pi2 = 3._1415F;
long id = 999_99_9999_L;
int num = _42;
int num = 0_x54;
int num = 0x_52;
int num = 0x52_;
int num = 052_;
int num = 5_2;
int num = 5_______2;
int num = 0x5_2;
int num = 0_52; (octal literal)