What is the output of this program?
class Literal19
{
public static void main(String[] args)
{
char c=65536;
System.out.println(c);
}
}
/*
Output:- CE[possible loss of precision]
Explanation:- The allowed range in char data type is 0 to 65535
*/
{
public static void main(String[] args)
{
char c=65536;
System.out.println(c);
}
}
/*
Output:- CE[possible loss of precision]
Explanation:- The allowed range in char data type is 0 to 65535
*/
0 comments: