
class WhileLoopMethod{
public static void main(String args[]){
new Hello();
}
}
class Hello{
int a = 5, b = 88;
while(a
}
//it is giving compile time error .....illegal start of type

Java While Loop
class WhileLoopMethod{
public static void main(String args[]){
new Hello();
}
}
class Hello{
Hello(){
int a = 5, b = 88;
while(a<b){
System.out.println("hh");
a++;
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.