Answers for "java while loop"

0

java while loop

// this will print 1 to 10.
int ctr = 1;
while(ctr <= 10)
{
  System.out.println(ctr); // print ctr value
  ctr++; // increment ctr value by 1
}
Posted by: Guest on January-28-2022

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language