Lecture 15
11
toString
•Suppose
–SomeClass foo = new SomeClass(  )
•Then these two expressions do the same thing:
–System.out.println( foo.toString() );
–System.out.println( foo );
•Every object knows how to respond to a toString message since there’s a toString in class Object
•For “foo” etymology, see the full online dictionary of computer science at http://foldoc.doc.ic.ac.uk