Every class inherits (implicitly) from the Object class in Java. • Every class is-a Object. • There are no fields in Object but there are.
The class containing an abstract method MUST be qualified as abstract. • An abstract method must be Java does not support multiple inheritance.
https://www.cs.colostate.edu/~cs200/Spring16/slides/08-advOO.pdf
An abstract class should have at least one abstract method. a class or an abstract class. ? In Java multiple inheritance is achieved using interfaces.
In Java 8 you have to do more work than this. Page 14. Other Examples of Abstract Classes. An interface specifies required behavior.
https://www.cs.colostate.edu/~cs200/Fall16/slides/08-advOO.pdf
Slides adapted from Liang Introduction to Java Programming
Can we force a subclass to override a method inherited from superclass? Yes we can leverage the power of abstract class. Page 17. Concrete Classes.
Introducing the concepts of Encapsulation and Inheritance. ? Learning the Super keyword Learning how to use interfaces and abstract classes in Java.
Abstract and Interfaces Recap 2