What is the output of this program?
class Literal26
{
public static void main(String[] args)
{
char c=6_5;
double d=1_26_520.72_25;
System.out.println(c);
System.out.println(d);
}
}
/*
Output:- A 126520.7225
Explanation:- Underscore can be used in any literals except boolean literal.
*/
{
public static void main(String[] args)
{
char c=6_5;
double d=1_26_520.72_25;
System.out.println(c);
System.out.println(d);
}
}
/*
Output:- A 126520.7225
Explanation:- Underscore can be used in any literals except boolean literal.
*/
0 comments: