62,620
社区成员
发帖
与我相关
我的任务
分享
public class Test6 {
public static void functionFor(){
for(;;);//可以通过编译 并且没有循环体“{}”
}
public static void functionWhile(){
while(true);//可以通过编译 并且没有循环体“{}”
}
}
Scanner s=new Scanner(System.in);
String str= s.next();
for(;s.equals("java");str=s.next()){
System.out.println("i love java");
}