Horje
java do while loop Code Example
While looping in java
int number = 1;

while(number < 10){
  System.out.println(number);
  number += 1;
}

java while loop
int count = 1;while (count < 11) {    System.out.println("The count is " + count);    count++; // remember, this increases the value of count by 1}
how to use while loop in java
int count = 10;
while(count < 10) {
  	System.out.println(count);
  	count++;
}

//while will run when if the condition is true
//if count is less then 10 the condition is true
//if count is more then 10 or equals to 10 it is false.
do statement java
class DoWhileLoopExample {
    public static void main(String args[]){
         int i=10;
         do{
              System.out.println(i);
              i--;
         }while(i>1);
    }
}
Java while loop example
//while loop  
int i=1;  
while(i<=10){  
System.out.println(i);  
i++;  
}  
java do while loop
int ctr = 1;
do
{
  System.out.println(ctr); // print ctr value
  ctr++; // increment ctr value by 1
}while(ctr <= 10);




Java

Related
double number java Code Example double number java Code Example
java swing place objects vertically Code Example java swing place objects vertically Code Example
<selector xmlns:android="http://schemas.android.com/apk/res/android><item android;drawable="@drawable/bluebtn" android: state_enabled="false"/> Code Example <selector xmlns:android="http://schemas.android.com/apk/res/android><item android;drawable="@drawable/bluebtn" android: state_enabled="false"/> Code Example
"%(class)s" in django Code Example "%(class)s" in django Code Example
java get end of date Code Example java get end of date Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11