for Loops
AP Computer Science A · Flashcards · Application
AP COMPUTER SCIENCE A · FLASHCARDS
Card 1
of 15
0 got it
0 to review
Current
Got it
Still learning
Not seen
QUESTION
What is the output of for(int i = 3; i >= 0; i--) { System.out.print(i); }?
QUESTION
Convert the for loop: for(int i = 0; i < 3; i++) { System.out.println(i); }
QUESTION
How many times will the loop execute: for(int i = 0; i < 4; i++) { }?
Tap to flip before you grade
ANSWER
4 times. Condition
i
<
4
i < 4
i
<
4
is true for values 0, 1, 2, 3.
Swipe → got it · swipe ← still learning
Got it
Still learning
Flip Card
Previous card
Next card