What will be the output of this code?
if (10 > 10){
System.out.println("reached");
}
What is no output?
What are two types of loops in Java?
What are any two of while loops, for loops, and do-while loops?
True or false, public static void main(String[] args) is a method
What is true?
Which animal is known for changing its skin color to blend into the environment?
Chameleon
What will be the output of this code?
System.out.println(true || false);
What is true?
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
How would you call a method named myMethod?
What is myMethod()?
What is the chemical symbol for gold?
Au
Which comparison operator will return true if two values are not equal?
What is != ?
Which of the following is a valid line of code?
What is for (int j = 0; j < 10; j++) {}?
What data type will this method return?public static int myMethod() {/* code */};
What is int?
In Scrabble, how many points is the letter "Q" worth?
10 points
How do you compare two strings?
What is str1.equals(str2)?
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 <= ?
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?
What is the smallest country in the world by area?
Vatican City
What is the output of this code?System.out.println(true && !(false || true));
What is false?
What will be the output of this code?
for (int i = 0; i < -10; i++){
System.out.println(i);
}
What is no output?
What will this code print out, if anything?
myMethod()
...
public static String myMethod(){
return "Message"
}
What is no output?
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