Java Program - Infinite for loop

class InfiniteForLoop {

public static void main(String[] args) {

/*
* Its perfectely legal to skip any of the 3 parts of the for loop.
* Below given for loop will run infinite times.
*/
for (;;)
System.out.println("Hello");

/*
* To terminate this program press ctrl + c in the console.
*/
}
}   

Output:
Hello
Hello
Hello
Hello
..
..

Comments

Popular posts from this blog

Introduction to C++ Programming Language

The Assembly Process Of 8086 Microprocessor-Two Pass Assembling Steps

Installing 8086 Assembler on a Computer