A blueprint for creating objects in Java, defining their properties and behaviors.
What is a class?
The data type that can only hold the values true or false, typically used in conditions.
What is a Boolean?
The fixed number of elements an array can hold, defined upon creation in Java.
What is lenght?
In Java, this data type is immutable, meaning its value cannot be changed after it is created.
What is a String?
A class that cannot be instantiated and often serves as a template or base class for subclasses.
What is an abstract class?
This is the keyword used to create an instance of an object from a class.
What is 'new'?
The name for a loop structure placed within another loop structure.
What is a nested loop?
The index of the first element in any Java array.
What is 0 (zero)?
The method used to compare the content of two strings for equality, rather than checking if they are the same object reference.
What is equals()?
A reserved keyword used within a subclass to refer to methods or constructors of its immediate parent class.
What is super?
The OOP principle of hiding implementation details and protecting data using keywords like private.
What is 'Encapsulation'?
It provides a simpler and more concise way to iterate through all the elements of an array or a collection.
What is an 'enhanced for-loop'?
The expression used to access the last element in an array named nums.
What is nums.length - 1?
The return value of the expression
"Hello".substring(1, 4).
What is "ell"?
The OOP principle exemplified when a single variable reference type can point to objects of several different related classes.
What is polymorphism?
A special method called automatically when an object is created, used to initialize an object's state.
What is a constructor?
This keyword is used to exit a loop immediately, regardless of the loop condition.
What is 'Break'?
The method name used to add a new element to the end of an ArrayList.
what is 'add'?
The return value of the expression
"Computer Science".indexOf('e')
What is 4?
A contract that a class implements, promising to provide specific method definitions. All methods in this type are implicitly public and abstract.
What is an interface?
The "is-a" relationship between a superclass and a subclass, established using the extends keyword.
What is inheritance?
The value of x after this code runs:
int x = 5;
for(int i = 0; i <= 5; i++)
{
x+=5;
}
what is 35?
The error thrown in Java if you try to access an array index that is outside the bounds of the array.
What is an ArrayIndexOutOfBoundsException?
The method used to determine the number of characters in a string.
What is length()?
The process of changing an object's reference type to one of its ancestor classes or interfaces.
What is upcasting?