Answers for "loop until java"

3

while loop in java

public class WhileLoopDemo
{
   public static void main(String args[])
   {
      int a = 1;
      while(a < 10)
      {
         System.out.println(a);
         a++;
         System.out.print("\n");
      }
   }
}
Posted by: Guest on November-21-2020
1

while loop in java

A while loop iterates a block of statements until condition is true. In a 
while loop condition is executed first.
Syntax:

while(condition)
{
   // code goes here
}
Posted by: Guest on October-23-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language