Computer Applications

What is meant by an infinite loop? Give an example.

Java Iterative Stmts

ICSE 2008

ICSE 2014

48 Likes

Answer

A loop that repeats for infinite number of iterations is known as infinite loop or endless loop.

Consider the example given below. Since all the parameters are missing in for loop, it will repeat for infinite number of times.

for (;;)
    System.out.println("Infinite Loop");

Answered By

24 Likes


Related Questions