This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 10
September 16, 1998
#1. In discussing the method
boolean equals ( Object o )
the text uses the example
Name n1 = new Name ("John", "Smith");
Name n2 = new Name ("John", "Smith");
boolean bVal = n1.equals(n2);
What value is assigned to bVal? What does the text say about the equals method defined in the class Object?
#2. Since all objects are considered as instances of class Object, any methods defined for that class must be universally applicable. What mechanism does the text recommend using to print Objects? Explain.