An object is a representation of a physical thing or an actual part or process. Think of it as a NOUN.
Properties are how you would describe an object. Think of them as ADJECTIVES.
Methods are what the object can do. Think of them as VERBS.
Java supports inheritance via the extends keyword. A class can only extend ONE other class. The class will automatically get all public methods, including any code written for them.
Java supports polymorphism in two ways:
- When a class extends another, you can over-ride an inherited method and write your own code for it.
- A class implements one or more other classes. This means that the class MUST include a method signature for ALL public methods it is implementing. The class it is implementing is called an INTERFACE. An interface class contains only method signatures- the methods do not contain code. It is up to the implementing class to provide the code.