Booleans and Conditionals
Loops
Methods
Miscellaneous
100

What will be the output of this code?

if (10 > 10){

    System.out.println("reached");

}

What is no output?

100

What are two types of loops in Java?

What are any two of while loops, for loops, and do-while loops?

100

True or false, public static void main(String[] args) is a method

What is true?

100

Which animal is known for changing its skin color to blend into the environment?
 

Chameleon

200

What will be the output of this code?

System.out.println(true || false);

What is true?

200

What will be the output of this code?

int i = 0;
while (i < 5){
  System.out.println(i);
  i++;
}

What is
0
1
2
3
4
 
?

200

How would you call a method named myMethod?

What is myMethod()?

200

What is the chemical symbol for gold?

Au

300

Which comparison operator will return true if two values are not equal?

What is != ?

300

Which of the following is a valid line of code?

  1. while(int i = 0; i < 4; i++) {}
  2. for(10) {}
  3. for (int j = 0; j < 10; j++) {}

What is for (int j = 0; j < 10; j++) {}?

300

What data type will this method return?
public static int myMethod() {/* code */};

What is int?

300

In Scrabble, how many points is the letter "Q" worth?
 

10 points

400


How do you compare two strings?

What is str1.equals(str2)?

400

What comparison operator should this loop use to make the loop print the numbers from 0 to 50?

int i = 0;
while (i /*REPLACE OPERATOR*/ 50){
  System.out.println(i);
  i++;
}

What is <= ?

400

What should replace /* REPLACE */ so the method myMethod takes in an integer called x as a parameter?

public static void myMethod(/*REPLACE*/){/*code*/}

What is int x?

400

What is the smallest country in the world by area?

Vatican City

500

What is the output of this code?
System.out.println(true && !(false || true));

What is false?

500

What will be the output of this code?

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

What is no output?

500

What will this code print out, if anything?

myMethod() 
...
public static String myMethod(){
  return "Message"
}

What is no output

500

What’s illegal to own as a pet in Switzerland unless you have at least two of them?
 

Guinea pigs, they get lonely, so the law requires a friend

M
e
n
u