Lecture 3: Inheritance III: College of Computer Science & Engineering
Lecture 3: Inheritance III: College of Computer Science & Engineering
Lecture 3: Inheritance III: College of Computer Science & Engineering
ICS201
super.super.toString() // ILLEGAL!
The Class “Object”
The class Object has some methods that every Java class
inherits (e.g. the equals and toString methods)
e and h are created from different classes. So both testH and testE
should be false. However, ..
Tip: getClass Versus instanceof