1/15
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Class
A blueprint for creating objects, defining fields (attributes) and methods (behavior).
Object
An instance of a class that holds actual values for fields and can use the class’s methods.
Encapsulation
Hiding internal details and exposing only what's necessary; achieved using private fields with public getters/setters.
Abstraction
Hiding complex logic behind a simple interface, often using abstract classes or interfaces.
Inheritance
Reusing code by creating new classes from existing ones, following the IS-A relationship.
Polymorphism
The ability for one name to have many forms depending on context, achieved through method overriding or overloading.
Method Overriding
Redefining a method in a subclass, requiring the use of @Override for safety and clarity.
Method Overloading
Defining multiple methods with the same name but different parameters, no annotation required.
Compile-Time Polymorphism
Occurs when the method to call is known at compile time, such as with method overloading.
Run-Time Polymorphism
Occurs when the method to call is determined at runtime based on the object’s type.
Access Modifiers
Keywords used to set the accessibility of classes, methods, and other members. Types include public, private, protected, and default.
Abstract Class
A class that can have fields and methods, used when classes share common behavior.
Interface
A contract that can only have constants and abstract methods, used when unrelated classes share a contract.
Packages
Used to group related classes together and avoid name conflicts, declared at the top of a file.
Fields
Attributes or properties of a class.
Methods
Actions that can be performed by an object of a class.