1/20
Definition flashcards covering Java polymorphism, abstract and concrete classes, final keywords, interfaces (including Java SE 8 and 9 enhancements), and UML conventions.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Polymorphism
A capability that enables you to program "in the general" and allows specifics to be dealt with during execution.
Abstract Class
A class that cannot be instantiated and is denoted in UML convention by italics.
Concrete Classes
Non-abstract classes that can be instantiated to create objects.
Interface Inheritance
A type of inheritance that occurs when a superclass contains only abstract method declarations.
publicabstractintmethod1();
The correct syntax to declare an abstract method named method1 that returns an int and takes no arguments.
Late Binding
Also called dynamic binding, this is the process of determining the correct method implementation to call at execution time when a superclass variable refers to a subclass object.
getClass
The method that every object in Java can use to access information about its own class.
final Method
A method that cannot be overridden; declaring methods as such can improve performance and allow inlining of code.
final Class
A class that cannot be inherited from, preventing further inheritance.
Interface (Java SE 7 and earlier)
A reference type that can contain only publicstaticfinal data and publicabstract methods; it cannot be instantiated.
Guillemets
The UML convention (e.g., <
implements
The keyword used to specify that a class will define the methods of an interface.
Serializable
An interface used to identify classes whose objects can be written to or read from storage or transmitted across a network.
AutoCloseable
An interface specifically intended to be implemented by classes used with the try-with-resources statement.
Default Interface Methods
Introduced in Java SE 8, these are public methods with concrete implementations in an interface that do not break existing classes that implement the interface.
Static Interface Methods
A Java SE 8 enhancement that allows helper methods to be declared directly in interfaces rather than in separate classes like Collections.
Functional Interface
As of Java SE 8, any interface containing only one (abstract) method; used extensively with lambda capabilities.
Lambda Expressions
A feature in Java SE 8 that provides a shorthand notation for creating anonymous methods.
Private Interface Methods
Introduced in Java SE 9, these allow the declaration of helper methods (instance or static) within an interface.
Factory Method
A publicstatic method that creates and initializes an object of a specified type and returns a reference to it, often used when constructors are private.
Loose Coupling
A characteristic of classes declared with interface inheritance, as opposed to the tight coupling associated with implementation inheritance.