Explain infinite loop with example in java
Icse Computer Class 10th
I will mark the brainliest answer and follow you if you give the correct answer
Answers
Answered by
1
Explanation:
An infinite loop occurs when a condition always evaluates to true. Usually, this is an error.
Example:
import java.util.*;
import java.lang.*;
class Rextester
{
public static void main(String args[])
{
do
{
System.out.print("java");
System.out.print(" ");
}while(true);
}
}
if you want understand you can search on YouTube
Similar questions