Objects First With Java - Solutions

Jun 16, 2006 ... Exercise 9.4. Add this line to the beginning of the print() method in the Video class: System.out.print("Video: ");. And this line in the beginning of the CD class: System.out.print("CD: ");. Exercise 9.5. The toString() method can be found on the class Object. It has no parameters and the return type is String.


part of the document



....