User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







java:loops:do

This is an old revision of the document!


Define Programming

do

do {
 command;
} while (condition);

a do loop will run while a condition is false

example of do loop in java

package codereferececomjava;
 
public class CodeRefereceComJava {
 
    public static void main(String[] args) {
 
        int i=4;
 
        do {
         i++;
        } while(i==4);
 
        System.out.println("i is :" + i );
    }
}

output of do

  i is :5
advertising
java/loops/do.1515695690.txt · Last modified: 2018/01/11 19:34 by defineprogramming

Impressum Datenschutz