public class WhileLoop { public static void main(String[] args) { //Argument to while must be boolean else we get error while(1)//error { } //{} braces are optional and we can take only "one" statement but it should not be declerative statement while(true) int a;//error //Unrechable Statement while(true) { System.out.println("hello"); } System.out.println("hi");//This is unrechable statement so error } }