COMS W1004 Lecture Notes - Lecture 20: Multiple Inheritance
Document Summary
At the top of hierarchy is the object class. Final class: one that cannot be extended (test) Final method means you cannot override that method when extended super() corresponds to parent class super(something, something) Can override methods in super class in subclass. Overloading is having methods with the same names but different parameters. Can set parent class to a type of the subclass. Polymorphism: use method as defined by underlying class. If an employee is set equal to a subclass manager, uses overloaded method in manager. Protected keyword acts as private except they are accessible for subclasses. You can override that if you want a meaningful output equals method is from object class, you can override this as well instanceof sees if an object is an instance of a designated class (see managertester2) Only job is to act as a superclass for more specific types. An object can be defined with an abstract class, just not instantiated.