Chapter 13 Flashcards
Abstract class
When you are designing classes, a superclass should contain common features that are shared by subclasses. Sometimes the superclass is so abstract that it cannot have any specific instances. These classes are called abstract classes and are declared using the abstract modifier. Abstract classes are like regular classes with data and methods, but you cannot create instances of abstract classes using the new operator
abstract method
A method signature without implementation. It’s implementation is provided by its subclasses. An abstract method is denoted with an abstract modifier and must be contained in an abstract class. In a non-abstract subclass extended from an abstract class, all abstract methods must be implemented, even if they are not used in the subclass.
deep copy
When cloning an object, all its fields are cloned recursively.
interface
An interface is treated like a special class in Java. Each interface is compiled into a separate bytecode file, just like a regular class. You cannot create an instance for an interface. The structure of a Java interface is similar to that of an abstract class in that it can have data and methods. The data, however, must be constants, and the methods can have only declarations without implementation. Single inheritance is the Java restriction wherein a class can inherit from a single superclass. This restriction is eased by the use of an interface.
marker interface
An empty interface that is used to signify that all the classes implementing the interface share certain properties.
shallow copy
When cloning an object, all its fields are copied.
subinterface
An interface inherited from another interface.