What is meant by an infinite loop? Give an example.
48 Likes
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
What is the purpose of using continue statement in a program?
Distinguish between while and do-while loop.
State one difference and one similarity between while loop and do-while loop.
Write the program in Java to display the first ten terms of the following series:
0, 1, 2, 3, 6,