Java Infinite Loops

Java Infinite Loops
0

#1

Java Infinite Loops

If you want your loop to go on infinitely, you can use the while, do while and for statement.

// Infinite For Loop
for ( ; ; )
{
    // your code here
}

// Infinite While Loop
while (true)
{
    // your code here
}

// Infinite Do While Loop
do
{
    // your code here
}
while (true);

#2