What is the output of this program?
class Literal20
{
public static void main(String[] args)
{
char c='\u0041';
System.out.println(c);
}
}
/*
Output:- A
Explanation:- We can assign a char literal in UNICODE representation which is
nothing but '\ uXXXX' where XXXX is hexadecimal number.
*/
{
public static void main(String[] args)
{
char c='\u0041';
System.out.println(c);
}
}
/*
Output:- A
Explanation:- We can assign a char literal in UNICODE representation which is
nothing but '\ uXXXX' where XXXX is hexadecimal number.
*/
0 comments: