/* * Infinitive while loop: * If you pass true in the while loop, it will be infinitive while loop. * * Syntax: * while(true){ * //code to be executed. * } * * For terminating infinity loop in command prompt, press ctrl+c * */ public class InfinityWhile { public static void main(String[] args) { // TODO Auto-generated method stub while(true) { System.out.println("Infinity while"); } } }