Objects & Classes
Data Types
Methods
Conditionals
Final Jeopardy
100

This error happens when a Book class constructor receives a title parameter, but the programmer mistakenly writes this.title = "Unknown"; causing every Book object to store the wrong title even though the code compiles normally.

What is a logic error?



100

This primitive data type can hold only two possible values.


What is boolean?



100

Benson runs this type of method that calculates how much he spent on his holiday, and the program gives him back a final total that he can print or store for later use.

What is a non-void method?

100

A programmer wants to check a second condition after an initial if statement but before using else, so they use this Java keyword pair.

What is else if?



200

You reach into a bag filled with Snickers, Skittles, and Starbursts. Each item is a different type, but they all belong to this same group.




What is the Candy class?

200

This primitive data type stores real numbers and provides greater precision than a float, making it the preferred choice for most calculations involving decimals in Java.

What is double?

200

A method might list parameters in its header, but these are the actual values you supply when calling the method so it can perform its task.

What are arguments?

200

These are the operators used to combine or modify boolean expressions, such as AND, OR, and NOT.


What are logical operators?



300

In a department store, a customer finds a polo shirt in the men’s section. The men’s section represents this overall term, while the polo shirt represents this specific term of a type.

What is class and object?

300

This would be the proper way to declare the value of pi rounded to the thousandths place.

What is 

double pi = 3.142;

?

300

This type of method must be called on a specific object, such as using myAccount.deposit(50); to update one bank account’s balance instead of all accounts.

What is an instance method?



300

De Morgan’s Law states that this expression is logically equivalent to !(a && b).

What is !a || !b?

400

This special piece of code runs automatically when you create a new object, giving it its own private instance variables and preparing it to use the public instance methods defined in the class.

What is a constructor?



400

This is the default value assigned to a reference data type variable when it has been declared but not yet connected to any object.

What is null?

400

Since this behavior is stand-alone and doesn’t depend on any object’s state, these words must appear before the method name ageCalculator that adds up all the years of someone’s age.  

What is public static int?



400

In a spicy-food app, you want to check whether the value called scoville is greater than 30,000 before printing "that's hot". This is the full header you would write to begin that conditional.

What is if (scoville > 30000)?

500

This occurs when a class defines multiple methods or constructors that share the same name but differ in the number, order, or types of parameters they accept, allowing them to be called in different ways.

What is overloading?



500

This is why a programmer might choose the 64-bit long data type instead of the 32-bit int.  This unwanted situation is when a calculation produces a value too large to fit in the available memory.

What is integer overflow?

500

Someone stores the word "banana" in a variable called word and wants to find the position of the first "a" before counting the rest, so they use this specific method call on the String.

What is word.indexOf("a")?

500

A field trip app checks whether a student may go by evaluating two variables — signedPermissionSlip and over16. The rule is that the student can travel if either the permission slip is signed or they are over 16. This is the full boolean assignment the program would use.

What is 

boolean canTravel = signedPermissionSlip || over16

?

500

A fitness tracking app wants to determine how many times a user completes a “fast lap” during their workout. The user runs 10 laps, and after each lap the program asks them to enter their lap time in seconds. Any lap time under 60 seconds counts as a fast lap. The app should keep a running total of fast laps using a variable named fastLaps. To complete this task, the solution must repeatedly ask for lap times using a for loop, and use a conditional inside that loop to decide whether to increase the fast-lap count.

answer on screen