This Java program is yet another example of an infinite loop that prints the word "Java" continuously. In this case, the loop header for(;;) does not include any initialization, condition or update expressions, which means that the loop will execute indefinitely. The program will continue to execute until it is forcefully terminated.
As with the previous examples of infinite loops using while and do-while loops, it is important to avoid writing infinite loops in programs, as they can cause the program to crash or consume excessive resources.
public class Infinite_For { public static void main(String[] args) { for(;;) { System.out.println("Java"); } } }
Java Java Java Java Java Java . . . Infinite
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions