Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

for Loop Issues
None of the three sections of the for declaration are required! The following example is perfectly legal : 
for( ; ; ) {
System.out.println("Inside an endless loop");
}

--------------------------------------------------
Code in Loop |            What Happens
--------------------------------------------------
break        |Execution jumps immediately to the
              first statement after the for loop.
-------------------------------------------------
return       |Execution immediately jumps back to
                     the calling method.
-------------------------------------------------
System.exit()|All program execution stops; the
                      VM shuts down. 
-------------------------------------------------
Posted By: Name:Rajesh Kr URL: for Loop Issues