Random
Data types & Variables
Control Structures
Methods
Classes and Objects
100

This show has a magical yellow pyramid named Bill Cypher

What is Gravity Falls

100

Can you compare a float to a double?

What is yes

100

This control structure is used to handle multiple conditions with specific cases.

What is a switch statement?

100

What happens if a method has a parameter but you call it without passing an argument?

What is a compilation error occurs?

100

This keyword is used to refer to the current instance of a class.

What is this?

200

Who lives in a pineapple under the sea?

Who is Spongebob Squarepants

200

This data type is used to store a single 16-bit Unicode character.

What is char

200

What is the if-statement equivalent of default in switch statements?

What is else

200

True or False: A static method belongs to an object, not the class.

What is False?

200

What term describes combining data and methods into a single unit, like a class?

What is encapsulation?

300

How many grams of caffeine are in a single can of Monster Energy (canned heart palpitations)?

What is 160mg

300

This keyword declares a constant variable whose value cannot be changed once assigned.

What is final

300

True or False: An else block is mandatory in an if-else statement.

What is False?

300

If two methods in the same class have the same name but different parameter lists, what is this called?

What is method overloading?

300

What is the purpose of a constructor in a Java class, and how does it differ from a method?

What is a constructor is used to initialize an object when it is created, setting initial values for instance variables, while a method defines behavior that objects of the class can perform. A constructor has the same name as the class and does not have a return type, whereas a method can have any name (except the class name) and typically has a return type.

400

What is Minecraft Bedrock Edition programmed in?

C++ (not java! :D/:()

400
What are the primitive Java data types? (plz list all of them :))

What is byte, short, int, long, float, double, boolean and char

400

What is the purpose of a break statement in a loop?

What is to immediately exit the loop?

400

What is the difference between a method parameter and an argument?

What is a parameter is the variable declared in the method signature, while an argument is the actual value passed to the method when it is called?

400

This term describes the process where a constructor calls another constructor in the same class or a superclass to streamline initialization.

What is constructor chaining?

500

This hit game released in 1999 was programmed by a single developer entirely in the Assembly Programming Language 

What is RollerCoaster Tycoon

500

How many bytes can a double store?

What is 8 bytes

500

True or False: The body of an if statement can execute without brackets

True, first line after will execute

500

Explain the difference between a static method and an instance method, and give an example of when you might use each.


What is a static method belongs to the class and can be called without creating an object, while an instance method belongs to an object and requires an instance of the class? Use static methods for utility functions (Math.sqrt()), and instance methods for behavior tied to specific objects (dog.bark()).

500

What is the difference between private, public, and protected access modifiers in Java, and how do they affect how classes can interact with each other?

What is private restricts access to the class itself, meaning no other class can directly access its members. Public allows full access to the class and its members from any other class. Protected allows access within the same package and by subclasses (even if they are in different packages). These modifiers control the visibility and interaction between classes by determining which classes can access certain fields, methods, or constructors.