Categories
java

while loop using boolean datatype in java

while loop using boolean datatype in java

In this tutorial, we will learn about while loop using boolean datatype in java

we can make an infinite loop in java using while keyword

Example

public class WhileExample {

	  public static void main(String[] args) {
      boolean isTrue = true;
      while (isTrue) {
       System.out.println("Inside while loop");
      }
  }

}
Reference

https://beginnersbug.com/while-loop-in-java/

Leave a Reply

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