A Java Program to show the use of For Loop.
publicclass JAVA_027 { publicstaticvoid main(String[] args) { int limit=20; int sum=0; for(int i=1;i<=limit;i++) sum+=i; System.out.println("Sum of first 20 integers = " + sum); } }