What is the output of this program?
class Literal17
{
public static void main(String[] args)
{
char c='ab';
System.out.println(c);
}
}
/*
Output:- CE[unclosed character literal-2, not a statement]
Explanation:- In char literal only one character is acceptable within single quote.
*/
{
public static void main(String[] args)
{
char c='ab';
System.out.println(c);
}
}
/*
Output:- CE[unclosed character literal-2, not a statement]
Explanation:- In char literal only one character is acceptable within single quote.
*/
0 comments: