What is the output of this program?
class Literal16
{
public static void main(String[] args)
{
char c="a";
System.out.println(c);
}
}
/*
Output:- CE[incompatible types]
Explanation:- String literal cannot assigned into a char data type.
*/
{
public static void main(String[] args)
{
char c="a";
System.out.println(c);
}
}
/*
Output:- CE[incompatible types]
Explanation:- String literal cannot assigned into a char data type.
*/
0 comments: