Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
easy Solved by 4 students

While Loop Output

< Prev
Next >

What is printed when the following code is executed?

public class LoopTest {
    public static void main(String[] args) {
        int count = 0;
        while(count < 3) {
            System.out.print(count + " ");
            count++;
        }
    }
}
A

1 2 3

B

Compilation Error

C

0 1 2

D

0 1 2 3

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question
Mark for review

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1sgarv251311 0m 00s 100
#2y.seong202711 0m 12s 88
#3hitrishabhatia14 0m 00s 70
#4bommasam00011 35m 04s -2,004
Items per page:
10
1 – 4 of 4
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|FAQ