1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Class
A blueprint that defines the properties (fields) and behaviors (methods) shared by all objects of that type.
Object
An instance of a class that contains its own unique data and can perform actions defined by the class’s methods.
Instance Variable
A variable defined in a class that holds data unique to each object instance.
Method
A block of code within a class that performs a specific task, often operating on instance variables.
Constructor
A special method used to initialize new objects; it has the same name as the class and no return type.
Instantiation
The process of creating a new object from a class using the new keyword.
Encapsulation
The practice of hiding internal data using private fields and providing controlled access through public methods.
Getter Method
A public method that returns the value of a private instance variable.
Example: public int getAge() { return age; }
Setter Method
A public method that modifies a private instance variable.
Example: public void setAge(int a) { age = a; }
Static Method
A method that belongs to the class, not to an object instance, and can be called using the class name.
Instance Method
A method that operates on specific object data and can access instance variables.
Reference Type
A variable that stores the memory address of an object rather than the actual object value.
Primitive Type
A basic data type that stores simple values directly (e.g., int, double, boolean).
Null Reference
A reference variable that does not point to any object; calling methods on it causes a NullPointerException.
Method Overloading
Defining multiple methods with the same name but different parameter lists in the same class
Return Type
The data type of the value that a method sends back to the caller; void means no return value.
Access Modifier
A keyword that defines the visibility of class members (e.g., public, private, protected).
The this Keyword
Refers to the current object instance and is used to differentiate instance variables from parameters
Dot Notation
The syntax used to access an object’s methods or fields (e.g., car.getMake()).
Java API
A collection of prewritten classes and methods that developers can use to simplify coding tasks
Math Class
A built-in Java class providing static methods for mathematical operations.
Example: Math.sqrt(25);
String Class
A class in Java representing text data; includes methods like .length(), .toUpperCase(), .substring().
ArrayList Class
A resizable array structure in Java that can dynamically store objects.
Example: ArrayList<String> names = new ArrayList<>();
Default Constructor
The no-argument constructor automatically provided by Java if no other constructor is defined.
Overloaded Constructor
A constructor with parameters that allow initialization with specific values
Object Reference Comparison
Using == compares memory addresses, not object contents. Use .equals() to compare values
Polymorphism (Introductory)
The concept that different objects can respond to the same method call in their own way.
Parameter Passing
Supplying data to methods via arguments; Java passes arguments by value
Return Statement
Used in methods to send a value back to the caller and terminate method execution.
NullPointerException
A runtime error that occurs when trying to call a method or access a field through a null reference.