Skip to content
CodeKruPro

How many times does a do-while body run?

QuizEasyJava only

What does this print?

int i = 10;
do {
    System.out.print(i + " ");
    i++;
} while (i < 5);
  • 10
  • Nothing
  • 10 11 12 13 14
  • It loops forever

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in