Java Simple While Loop



Αξιολόγηση Χρήστη:  / 0
ΧειρότεροΚαλύτερο 
Λεπτομέρειες

Simple While Loop example in Java :

View source
package com.developerpages.snippets.basics;
 
public class SimpleWhileLoopExample {
 
    public static void main(String[] args) {
        int i = 0;
        int max = 10;
 
        System.out.println("Loop " + max + " times");
 
        while (i < max) {
            i++;
            System.out.println("i is : " + i);
        }
 
    }
}


You have no rights to post comments

   

     

© Developerpages