Java OOP Concepts Flashcards
In Java, a ___ is a blueprint for creating objects.
An ___ is an instance of a class and has its own state and behavior.
class and objects
A ___ in Java is a block of code that performs a specific task.
___ are used to divide a program into smaller and more manageable pieces.
method/s
A ___ in Java is a special method that is used to create an object.
____s have the same name as the class and are called when an object is created.
constructor
A ___ in Java is a sequence of characters.
____ are used to represent text in a program and provide a wide range of methods for manipulating and comparing them.
string
____ are keywords in Java that determine the accessibility of classes, methods,
and variables in a Java program. There are four types of access modifiers: public, protected, private, and default.
access modifiers
In Java, ___ is a keyword that refers to the current object instance. It is used to refer to the current object’s members, methods, and constructors.
“this” keyword
In Java, ___ is a keyword that can be used to declare a variable, method, or class as
unchangeable or immutable. Once a variable is declared final, its value cannot be changed, and
if a method is declared final, it cannot be overridden by a subclass.
“final” keyword
Java ___ is a programming technique where a method calls itself to solve a problem. It is a common technique used in solving problems that can be broken down into smaller subproblems.
recursion
Java ___ is a mechanism in which one class acquires the properties (fields and methods) of another class. The class that is inherited is called the superclass, and the class that inherits is called the subclass.
inheritance
Java ___ is a mechanism in which a subclass provides its own implementation of
a method that is already defined in its superclass. The method in the subclass must have the same name, return type, and parameter list as the method in the superclass.
Method Overriding
Java ___ is a mechanism in which a class can have multiple methods with the same name but different parameter lists. The method that is called depends on the number and type of arguments passed to it.
Method Overloading
In Java, ___ is a keyword that refers to the superclass of a subclass. It is used to call the
superclass constructor, access the superclass’s fields and methods, and prevent method overriding.
“super” keyword
Java ___ is a class that cannot be instantiated, and it is used to provide a base or framework for subclasses. An abstract method is a method that has no implementation in the abstract class, and it must be implemented in the subclass.
Abstract class
Java ___ are a collection of abstract methods that can be implemented by a class. They are used to define a contract between the implementing class and the rest of the program.
java interfaces
Java ___ is a concept in which a single object can take on different forms or types. It can be achieved through method overloading, method overriding, and inheritance.
polymorphism