What’s the default value of char?

The default value of a char attribute is indeed '\u0000' (the null character) as stated in the Java Language Specification, section ยง4.12.5 Initial Values of Variables .

In my system, the line System.out.println('\u0000'); prints a little square, meaning that it’s not a printable character – as expected.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)