Syntax
Data Types & Variables
Objects & OOP
Exceptions & Errors
Debug
100

This punctuation mark must end most Java statements.

What is a semicolon?

100

This primitive type stores whole numbers like 5 or -42.

What is int?

100

This keyword creates a new object from a class.

What is new?

100

This Java keyword is used to handle exceptions.

What is try?

100

String name;
System.out.println(name);

Error: Using a variable before initializing it.
String name = "Pi";

200

This method is always the starting point of a Java program.

What is main?

200

The line of code to declare an integer with the name age that is given the value 15. 

What is int age = 15;?

200

These are variables that belong to an object and define its state.

What are instance variables?

200

This block of code runs only if an exception is thrown.

What is catch?

200

while (true) {
    System.out.println("Looping...");
}

Error: infinite loop create, the program will never end.

300

This keyword stops a loop immediately.

What is break?

300

This non-primitive type stores text.

What is String?

300

This keyword refers to the current object within a class.

What is this?

300

This type of error is found by the compiler before the program runs.

What is a compile-time error?

300

int x = 5;
if (x = 10) {
    System.out.println("x is 10");
}

Error: Using assignment = instead of comparison == in the if condition.
Fix: Change x = 10 to x == 10.

400

This method checks if two strings have exactly the same characters.

What is equals()?

400

This method returns the number of characters in a string.

What is length()?

400

This keyword allows a class to use fields and methods from another class.

What is extends?

400

This exception occurs when you try to use an array index that doesn’t exist.

What is ArrayIndexOutOfBoundsException?

400

for (int i = 1; i < 10; i--) {
    System.out.println(i);
}

Error: Loop counter is decreasing (i--) but condition expects increasing (i < 10), causing an infinite loop.
Fix: Change i-- to i++.

500

This keyword is used to indicate that a method will not return any value.

What is void?

500

This is the default value for an uninitialized boolean variable in a class.

What is false?

500

This keyword is used so that a subclass can call its parent class’s constructor or methods.

What is super?

500

This type of error happens while the program is running.

What is a runtime error?

500

public class MyClass {
    public void myMethod() {
        int x = 10;
    }
    System.out.println(x);
}

Error: Trying to access a local variable x outside its scope causes a compilation error.
Fix: Move System.out.println(x); inside the method or make x a class variable.

M
e
n
u