English

What is an Infinite Loop ? Write an Infinite Loop Statement.

Advertisements

Question

What is an infinite loop ? Write an infinite loop statement.

Answer in Brief
Advertisements

Solution

An infinite loop can be created by skipping the condition. This provides infinite statements to be executed again and again.
An infinite loop statement :
int i;
for (i = 1; ; i++)
{
System.out.println(“This is an end loop”).
}

shaalaa.com
Introduction of Nested Loop
  Is there an error in this question or solution?
2013-2014 (March) Set 1
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×