Abstract Classes § cannot be instantiated and contains one or more abstract methods (no definition body). § can contain methods § can contain data declarations
Abstract Methods § An abstract method is a method without a body. § It cannot be final or static because there is no definition, and it should be changed later.
Interfaces § Interfaces contains behaviors that a class implements. § An interface cannot be instantiated § An interface does not contain any constructors. § In an interface, all methods are abstract. § An interface cannot contain instance fields. The only fields that can appear in an interface must be declared both static and final. § An interface is not extended by a class; it is implemented by a class. § An interface can extend multiple interfaces.
Polymorphism § A polymorphic reference is a reference variable that can refer to different types of objects at different points in time. § Polymorphic references are resolved at run-time, not during compilation.
Ph.D. [email protected] Fall 2021 Copyright. These slides can only be used as study material for the class CSE205 at Arizona State University. They cannot be distributed or used for another purpose.