Single Choice Easy

QWhich of the following loops runs without any condition and runs infinitely?

ID: #22936 TCS Core Java Questions 86 views
Question Info
#22936Q ID
EasyDifficulty
TCS Core Java QuestionsTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A do while, for loop
  • B while loop
  • C finite loop
  • D infinite loop
Correct Answer

Explanation

The correct option is:

infinite loop

An infinite loop runs continuously without any condition to terminate. Examples of such loops in Java include while(true) or for(;;). The other loops, like do while, for, and while, typically have conditions that can terminate them.

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.