Java simple program to print Integers

class Integers {
  public static void main(String[] arguments) {
    int c; //declaring a variable
  /* Using for loop to repeat instruction execution */
    for (c = 1; c <= 10; c++) {
      System.out.println(c);
    }
  }
}

Output :

 

 

Share Your Comments
Previous C# program for Static Constructor
Next Attendance System Project in VB.Net

About author

Aamir Shaikh
Aamir Shaikh 1705 posts

<p>A Blogger, SEO Analyst and passionate Web Developer from India.<br /> Believes in hard work and continues working to achieve success.</p>

View all posts by this author →

You might also like