Thread: looping in java
View Single Post
Banned
24May2012,15:28  
mfred90's Avatar
I am lill bit confuse I am giving you example of do while loop.
The do...while Loop:
Code:
public class Test {
   public static void main(String args[]){
      int x= 10;

      do{
         System.out.print("value of x : " + x );
         x++;
         System.out.print("\n");
      }while( x < 20 );
   }
}

Last edited by coderzone; 24May2012 at 16:30.. Reason: Code blocks