Showing posts with label print infinite number. Show all posts
Showing posts with label print infinite number. Show all posts

Wednesday, 19 July 2017

To print infinite numbers using for loop


public class Infinite {
public static void main(String[] args) {
    for(;;){
    for(int i=0;;i++)
    {
        System.out.println(i);
    }  }
}
}