Lecture 16
4
toString in class Object
•NamedObject@206fdf64
•Not very informative
•(class name)@(weird number)
•weird number is actually base 16 (hexadecimal)
–(digits 0123456789abcde)
•weird number may change when program runs again
Repeat slide from last lecture, but didn’t get to discuss it. Point out in OverridingDemo.java which line of code produces this output – the one with “super” that invokes overridden toString from Object.

For those who know about pointers, the hex number is a kind of memory address (internal to Java, not a real memory address).