Answers for "while true loops java"

2

while with boolean injava

boolean b = false;
while(!b) {
System.out.println(b);
b = !b;
}
Posted by: Guest on July-21-2021
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