Variables & Data Collections
Control Flow
Classes & Objects
Sorting & Searching
Code Tracing
100

The data type that holds true/false values

What is a boolean?

100

The name for the technique used to branch code into two or more different paths based on some condition.

What is an if-statement?

100

This special method is automatically called when a new object is created to initialize its attributes.

What is a constructor?

100

This basic search checks each element in the data structure one by one to check for a match.

What is Linear Search?

100

Given the following code, this is printed:

int x = 3;
int y = 4;
System.out.println(x + y * 2);

What is 11?

200

The data type in Java that holds uppercase A when you set it to 65.

What is a char?

200

This keyword is used to exit a loop prematurely, regardless of the loop's condition.

What is break?

200

This keyword refers to the current instance of a class and is used to access its attributes and methods.

(Especially when two attributes have the same name)

What is this?

200

This simple sorting algorithm repeatedly steps through a list, compares adjacent elements and swaps them if they are in the wrong order.

What is Bubble Sort?

200

Given the following code, this is printed:

int sum = 0;
for (int i = 1; i <= 3; i++) {
    sum += i;
}
System.out.println(sum);

What is 6?

300

User-created variable-types are also called this.

What is a Class/Object?

300

This type of loop guarantees the code inside it runs at least once before checking its condition.

What is a do-while loop?

300

This keyword is used to keep certain attributes of a class invisible to classes outside of the one which it is defined.

What is private?

300

This searching algorithm efficiently finds an item in a sorted list by repeatedly dividing the search interval in half.

What is Binary Search?

300

Given the code, this is the output:

int a = 5;
int b = 2;
int temp = a;
a = b;
b = temp;
System.out.println(a + " " + b);

What is 2 5?

400

The two ways we have learned to hold multiple members of a single primitive or object type

What are ArrayLists and Arrays

400

This control flow concept refers to placing one loop or conditional statement inside another to handle more complex logic.

What is nesting?

400

This type of keyword is used for methods and attributes of a class which belong to the class as a whole rather than any specific instance of it

What is static?

400

This term describes how the runtime of an algorithm grows with input size and is often expressed using Big-O notation.

What is time-complexity?

400

Given the code we get the output:

int sum = 0;

for (int i = 1; i <= 3; i++) {

    for (int j = 1; j <= i; j++) {

        sum += j;

    }

}

System.out.println(sum);


What is 10?

500

This variable type that we learned about can hold multiple entries but only of a certain type

What are strings?

500

This statement skips the remaining code in the current iteration of the loop and proceeds to the next iteration.

What is continue?

500

This concept refers to restricting direct access to an object's data and requiring the use of methods to modify it.

What is Encapsulation?

500

This sorting algorithm divides a list into smaller sublists, sorts them, and then combines them back together.

What is Merge Sort?

500

Given the code, this is the value printed:

public static int mystery(int n) {
    if (n == 1) {
        return 2;
    }
    return n + mystery(n - 1);
}

System.out.println(mystery(4));

What is 11?