OOP: The Classics
Control Flow & Loops
Arrays & ArrayLists
Strings & String Methods
Object-Oriented Principles
100

A blueprint for creating objects in Java, defining their properties and behaviors.

What is a class?

100


The data type that can only hold the values true or false, typically used in conditions.

What is a Boolean?

100

The fixed number of elements an array can hold, defined upon creation in Java.

What is lenght?

100

In Java, this data type is immutable, meaning its value cannot be changed after it is created.

What is a String?

100

A class that cannot be instantiated and often serves as a template or base class for subclasses.

What is an abstract class?

200

This is the keyword used to create an instance of an object from a class.

What is 'new'?

200

The name for a loop structure placed within another loop structure.

What is a nested loop?

200

The index of the first element in any Java array.

What is 0 (zero)?

200

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()?

200

A reserved keyword used within a subclass to refer to methods or constructors of its immediate parent class.

What is super?

300

The OOP principle of hiding implementation details and protecting data using keywords like private.

What is 'Encapsulation'?

300

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'?

300

The expression used to access the last element in an array named nums.

What is nums.length - 1?

300

The return value of the expression
"Hello".substring(1, 4).

What is "ell"?

300

The OOP principle exemplified when a single variable reference type can point to objects of several different related classes.

What is polymorphism?

400

A special method called automatically when an object is created, used to initialize an object's state.

What is a constructor?

400

This keyword is used to exit a loop immediately, regardless of the loop condition.

What is 'Break'?

400

The method name used to add a new element to the end of an ArrayList.

what is 'add'?

400

The return value of the expression
"Computer Science".indexOf('e')

What is 4?

400

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?

500

The "is-a" relationship between a superclass and a subclass, established using the extends keyword.

What is inheritance?

500

The value of x after this code runs:
int x = 5; 
for(int i = 0; i <= 5; i++) 
{
     x+=5; 

}

what is 35?

500

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?

500

The method used to determine the number of characters in a string.

What is length()?

500

The process of changing an object's reference type to one of its ancestor classes or interfaces.

What is upcasting?

M
e
n
u