1、没有自增自减变量
public static void main(String[] args){
int x = 0;
while( x < 3 ) {
System.out.println("value of x : " + x );
//i++;
continue;
}
}
2、条件永远为true
public static void main(String[] args){
int x = 0;
while(true) {
System.out.println("value of x : " + x );
}
}
3、do while中没有自增自减变量
public static void main(String[] args){
int x = 0;
do{
System.out.println("value of x : " + x );
}while( x < 3 );
}
4、死代码
public static void main(String[] args){
while(true){}
}