Jargon Jumble
Op sa Mid
OOP I did it again!
Bug Hunt
Code in 5
100

In Java, this is a blueprint for creating objects

What is a Class?

100

This operator is used to join strings in Java.

what is + operator? 

100

This principle bundles fields and methods into a single unit.

What is encapsulation?
100

public class Test {
public static void main(String[] args) {
int x = "10";
System.out.println(x);
}
}

What is int?

(Data type mismatch)

100

int a = 5, b = 3;

System.out.println(a + b);

What is 8

200

This keyword is used for inheritance in Java.

What is extends?


200

This is the result of 10 % 3

What is 1?

200

This principle allows one interface to represent many different forms.

What is polymorphism?

200

public class Compare {
public static void main(String[] args) {
int x = 5;
if (x = 5) {
System.out.println("Yes");
}
}
}

What is =?

(Uses = instead of == in if statement)

200

int x = 7;

System.out.println("Result: " + (x * 2));

What is Result: 14?

300

This OOP principle hides internal details while showing only essential features.

What is abstraction?

300

This operator compares the values of two variables for equality.

What is == (is equal to)?

300

This principle lets a child class reuse or override methods of its parent class.

What is inheritance?

300

public class Demo {
public void main(String[] args) {
System.out.println("Hello, world!");
}
}

What is static?

(Missing static keyword in main method)

300

int a = 10, b = 20;

System.out.println(a > b ? "A is bigger" : "B is bigger");

What is B is Bigger?

400

This OOP concept allows one method or operator to behave differently based on the object that is calling it.

What is polymorphism?

400

This operator is used to increase a variable’s value by 1.

what is ++ (increment)?

400

When a subclass defines a method with the same name and parameters as its parent, this occurs.

What is method overriding?


400

public class LoopTest {
public static void main(String[] args) {
for (int i = 0; i < 5; i--) {
System.out.println(i);
}
}
}

What is i--?

(Will cause an infinite loop)

400

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

    System.out.print(i + " ");

}

What is 1 2 3?

500

This keyword is used to refer to the instantiated object’s variable instead of the constructor parameter.

What is this?

500

int a = 5, b = 10; System.out.println(a > 2 && b < 20);

What is true?

500

This is the main benefit of using OOP

What is DRY?

500

public class BankAccount {
private double balance = 1000;

public static void main(String[] args) {
BankAccount acct = new BankAccount();
System.out.println(acct.balance);
}
}

What is acct.balance?

(Accessing a private variable directly, use a getter method to access private variable)

500

class Animal {

void sound() {
System.out.println("Animal sound"); }
}

class Dog extends Animal {
void sound() {
System.out.println("Bark"); }
}

public class Test {
public static void main(String[] args) {
Animal a = new Dog();
a.sound();
}
}

What is bark?

M
e
n
u