CSE 115 Lecture 29: 04.06.16 lecture notes
37 views3 pages
6 May 2016
School
Department
Course
Professor
Document Summary
A class can implement an arbitrary number of interfaces. The class object is pre-defined in the language. Object does not extend any class, and is the only class that does not have a parent class. Any class (other than object) which does not have an explicit extends" clause in its header extends object by default. Note the distinction between object, which is a class, and object, which refers to an instance of a class. Type vs class hierarchy class: single root object type: many roots. All instantiable types (concrete classes) fall under object. This means all objects (class instances) are of type object. Since both classes and interfaces define types, the class hierarchy is a sub- hierarchy of the type hierarchy. The class hierarchy has a single root (object) The type hierarchy does not have a single root (since any interface which does not extend another interface is a root)