What is the output of this program?

class Literal18
{
public static void main(String[] args)
{
char c1=65;
char c2=0102;
char c3=0x43;
System.out.println(c1);
System.out.println(c2);
System.out.println(c3);
}
}
/*
Output:- A B C
Explanation:- We can assign a  integral, octal, hexadecimal literal into
char data type which represents unicode value of that character.
*/

0 comments: