Monday, 9 May 2016

Loop in Java

class Loops {
  public static void main(String[] arguments) {
    int i;
 
  
 
    for (i = 1; i <= 10; i++) {
      System.out.println(i);
    }
  }
}
 
Output:
1
2
3
4
5
6
7
8
9
10 

No comments:

Post a Comment