Tuesday, January 20, 2015

Chapter 2

In the second chapter of Headfirst java, I learned about subclasses and superclasses, and how subclasses can override superclass methods. For example, if we have a superclass called Shape, we can have subclasses Square and Triangle. The subclasses can have their own unique variables and classes, while preserving any of Shape's methods assuming they haven't been overridden.

No comments:

Post a Comment