February 2014
Beginner
1248 pages
62h 25m
English
As we’ve seen, every object in Java has a toString method that enables a program to obtain the object’s string representation. Unfortunately, this technique cannot be used with primitive types because they do not have methods. Class String provides static methods that take an argument of any type and convert it to a String object. Figure 14.9 demonstrates the String class valueOf methods.
Read now
Unlock full access