While Loop

Learn While Loop in Java

public class Demo {
public static void main(String args[]) {
// cntl + shift + f for format

int counter = 1;

while(counter < 15){
System.out.println(“The counter is ” + counter);
counter++;
}
}

}

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.