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