User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







java:loops:while

while

while (condition) {
 
//command
 
}

a while loop do something while a condition

example of while loop in java

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

output of while

  i is :5

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
java/loops/while.txt · Last modified: 2024/02/16 01:04 (external edit)

Impressum Datenschutz