Multiple Choice
Which of the following is equivalent to this code segment?
Int total = 0;
For (int i = 0; i <= 20; i += 2)
Total += i;
A) int total = 0; for (int i = 20; i < 0; i += 1)
Total += i;
B) int total = 0; for (int i = 0; i <= 20; total += i, i += 2) ;
C) int total = 0; for (int i = 0, i <= 20, total += i; i += 2) ;
D) int total = 0; for (int i = 2; i < 20; total += i, i += 2) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q2: Which of the following statements about the
Q3: Consider the following two Java code segments:
Q5: Suppose variable gender contains MALE and age
Q6: Which statement prints the floating-point value 123.456
Q11: Which case of the following would warrant
Q17: For the two code segments below:<br>Segment A<br>Int
Q25: For the code segment below:<br>Switch(q)<br>{<br>Case 1:<br>System.out.println("apple");<br>Break;<br>Case 2:<br>System.out.println("orange");<br>Break;<br>Case
Q26: Which of the following will count down
Q26: Consider the code segment below.<br>If (gender ==
Q27: Counter-controlled repetition requires<br>A)A control variable and initial