Java Abstract Classes and Interfaces

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering the core concepts, syntax, and rules of Java abstract classes, abstract methods, and interfaces based on STI course handouts.

12 Terms

1
New cards

Abstract Class

A class created to ensure that subclasses implement necessary methods; it cannot be instantiated directly, may include non-abstract methods and variables, and cannot be marked as final.

2
New cards

Abstract Method

A method defined with the abstract keyword that has no body, is declared with a semicolon instead of braces, may only reside in an abstract class, and must be implemented by subclasses.

3
New cards

Concrete Class

A non-abstract class that extends an abstract class or implements an interface; the first concrete class in an inheritance hierarchy is required to implement all inherited abstract methods.

4
New cards

Interface

A reference type created using the interface keyword that represents a collection of related abstract public methods, and can also contain default methods, static methods, and constant declarations.

5
New cards

implements Keyword

The keyword added to a class declaration to enable that class to implement one or more interfaces.

6
New cards

Interface Constants

Variables declared in an interface that are implicitly public, static, and final, making explicit inclusion of these keywords unnecessary.

7
New cards

Interface Methods

Methods declared within an interface; all abstract, default, and static methods in an interface are implicitly public.

8
New cards

Abstract Method Overriding Rules

The requirements when overriding an abstract method in a subclass: the new method must declare the same name, parameter list, and return type, and must be at least as accessible as the method in the parent class.

9
New cards

Final Modifier Restriction on Abstract Entities

A Java rule specifying that neither an abstract class nor an abstract method can be marked as final, because a final class cannot be extended and a final method cannot be overridden.

10
New cards

Private Modifier Restriction on Abstract Methods

A Java rule stating that an abstract method cannot be marked as private because private methods are only accessible within the class where they belong and thus cannot be overridden by subclasses.

11
New cards

Abstract Class Interface Inheritance

The rule establishing that an abstract class that implements an interface inherits all abstract methods as its own abstract methods, but is not required to provide implementations for them.

12
New cards

Conflicting Return Types in Interface Implementation

An invalid implementation condition in Java where a class cannot implement two or more interfaces if they contain methods sharing the same signature but differing in return types.