![]() |
Character lacks a static toString method, while all the other scalar type wrappers have one. The workaround is to make a temporary instance and use the instance toString() method instead.
This deficiency is still present in JDK 1.1.
% javac CharBug.java
CharBug.java:12: No method matching toString(char) found in class java.lang.Character.
b = Character.toString( a ); // this one does not work
^
1 error