1. What does the following code print when x has been set to 187?
2. When the following code executes and x equals 4 and y equals 3, 'second case' is printed.
3. What is the value of grade when the following code executes and score is 80?
4. Which of the following expressions is equivalent to !(c || d) ?
5. The following method will return true if and only if:
6. Ruth is 5 years older than Jonathan. 3 years from now Ruth?s age will be twice Jonathan?s age. What should be in place of the following condition to solve this problem?
7. Assuming that x and y have been declared as valid integer values, which of the following is equivalent to this statement?
8. What would the following print?
9. What would the following print?
10. How many stars are output when the following is output?
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++)
System.out.println("*");
}for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++)
System.out.println("*");
}
11. What are the values of var1 and var2 after the following code segment is executed and the while loop finishes?
12. What is printed as a result of the following code segment?
13. Writing down the values of the variables and how they change each time the body of the loop executes - this is also called.
14. Getting the start and end conditions wrong on the for loop. This will often result in you getting an ______________.
15. ___________: The type of evaluation used for logical and "&&" and logical or "||" expressions.