Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

do statement java

do
{
   statement(s);
} while(condition);
Comment

do statement java

class DoWhileLoopExample {
    public static void main(String args[]){
         int i=10;
         do{
              System.out.println(i);
              i--;
         }while(i>1);
    }
}
Comment

do statement java

10
9
8
7
6
5
4
3
2
Comment

do statement java

class DoWhileLoopExample2 {
    public static void main(String args[]){
         int arr[]={2,11,45,9};
         //i starts with 0 as array index starts with 0
         int i=0;
         do{
              System.out.println(arr[i]);
              i++;
         }while(i<4);
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: splay tree java implementation 
Java :: hashmap sort ascending 
Java :: important features of java programming language 
Java :: java how to create an array with existing objects 
Java :: hashmaps java 
Java :: elif java 
Java :: reverse java 
Java :: how to add a listener to a toggle group radio buttons javafx 
Java :: even and odd java & 
Java :: Java User Input (Scanner) 
Java :: how to name loops in java 
Java :: java all characters in alphabet order simpler 
Java :: regular expression java 
Java :: latest android sdk version 
Java :: mockito method called 
Java :: Java The Throw/Throws Keyword 
Java :: remove spaces java 
Java :: java hash map 
Java :: java home 
Java :: android get sdk version 
Java :: interface extending interface in java 
Java :: Fix arabic javafx 
Java :: practical1_answer 
Java :: lcm of two large positive integers java 
Java :: how to call super onbackpressed in fragment 
Java :: How to find the maximum occurring character in a given String? using hashmap java 
Java :: how to return the first character in an array from a method java 
Java :: how to remove scroll pane border 
Java :: calendar check if month is 30 days 
Java :: array.swap java 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =