What is the output of this program?
class Literal15
{
public static void main(String[] args)
{
char c=a;
System.out.println(c);
}
}
/*
Output:- CE[Cannot find symbol]
Explanation:- If we are trying to assign a char literal then it must be enclosed within single quotes.
*/
{
public static void main(String[] args)
{
char c=a;
System.out.println(c);
}
}
/*
Output:- CE[Cannot find symbol]
Explanation:- If we are trying to assign a char literal then it must be enclosed within single quotes.
*/
0 comments: