AP Computer Science A Quiz
20 questions · no time limit
0:00
SELECTION AND ITERATION
Question 1 of 20
No time limit
Current
Answered
Flagged
Not seen
Refer to the code below. Which part of the loop increments the loop counter? public class EvenSumStepTwo { public static void main(String[] args) { int[] numbers = {1, 2, 3, 4}; int evenSum = 0; // Loop increments by 2 each iteration for (int index = 0; index < numbers.length; index += 2) { if (numbers[index] % 2 == 0) { evenSum += numbers[index]; } } System.out.println("Even sum: " + evenSum); } }
YOUR PROGRESS
20
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F