class CHar
{
public static void main(String []l)
{
char j='\u0000';
System.out.println("value of char j="+j);
}
}
When I print the value of j then it prints nothing it means null value, but java dic says the default value of char is '\u0000' with which I agree, but the default value should be print. Instead of printing the default value it prints
C:\Users\Mohit-Pc\Desktop\Java Array>java CHar
value of char j=
That it is nothing means null. I'm still confused, whether I use instead of char default value, null then it generates an error:
CHar.java:5: error: incompatible types: cannot be converted to char char j=null;