How many times will the following loop execute?

Last Updated :
Discuss
Comments

How many times will the following loop execute?

Java
int i = 1;
while (i <= 5) {
    System.out.println("Hello");
}


5 times

6 times

Infinite times


Compilation Error

Share your thoughts in the comments