This is the entry point of a Java program.
public static void main(String[] args)
To find how many elements are in an array, you use this property.
length()
A method that might throw a checked exception must declare it using this keyword.
throws
This keyword is used in Java to create a subclass from a parent class.
extends
A class variable that is shared across all instances is called?
static variable
This keyword is used to create an object from a class.
new
This loop executes at least once even if the condition is false.
do - while loop
A method can manually generate an exception using this keyword.
throw
This principle ensures that a subclass can reuse code from a parent class while adding or modifying behavior.
inheritance
The concept of bundling data and methods together is called?
Encapsulation
This method returns the larger of two numbers.
Math.max()
This method can sort an array of integers in ascending order with just one line of code.
Arrays.sort(array)
This exception occurs when attempting to convert a string to a number but the format is invalid.
NumberFormatException
Members of a class that are private cannot be inherited directly by this class type.
subclass
When objects take many forms, it demonstrates which OOP concept?
Polymorphism
This occurs when multiple methods in the same class have the same name but different parameters (type, number, or order).
method overloading
This is how you create an empty ArrayList of Strings called names
ArrayList<String> names = new ArrayList<>();
This exception occurs when you try to access an array index that does not exist.
ArrayIndexOutOfBoundsException
In Java, when a constructor in a subclass calls super(), this happens first.
the parent class constructor executes first
When a class has multiple methods with the same name but different parameters, it is called?
Method overloading
This keyword is used inside a subclass method to explicitly call the parent class’s version of an overridden method.
super
For enhanced for-loops, you do not need this to access array elements.
an index variable
This exception occurs when a program encounters an input/output problem, such as reading from a file that cannot be accessed.
IOException
A subclass cannot inherit private members directly from its parent, but it can access them indirectly using this.
getter/setter methods
A special type of variable or method that belongs to the class itself, rather than any particular instance, and is shared across all objects of that class.
static