What is the output of this program?

class Literal24
{
public static void main(String[] args)
{
int i=1_23_456;
System.out.println(i);
}
}
/*
Output:- 123456
Explanation:- From 1.7 version of java we can underscore(_) symbol in numeric literals.
At the time of compilation these underscore symbol will be removed automatically. The main
advantage of this approach is readability of the code will be improved.
*/

0 comments: