while(true) {
//do whatever
}
// Infinite for Loop
class Infinite {
public static void main(String[] args) {
int sum = 0;
for (int i = 1; i <= 10; --i) {
System.out.println("Hello");
}
}
}
class Main {
public static void main(String args[]){
for(int i=1; i>=1; i++){
System.out.println("The value of i is: "+i);
}
}
}
class Main {
public static void main(String args[]){
int i=2;
while(i>1)
{
System.out.println(i);
i++;
}
}
}
for(int i=0;i!=0;i++) return;
// infinite while loop
while(true){
// body of loop
}
for (;;)
{
// Business logic
// Any break logic
}