/* * Infinitive for loop: * If you use two semicolons ;; in the for loop, it will be infinitive for loop. * * Syntax: * for(;;){ * //code to be executed * } * * In the command prompt, press ctrl + c to terminate infinity for loop. */ public class InfinityFor { public static void main(String[] args) { // TODO Auto-generated method stub for(;;) { System.out.println("Infinity for"); } } }