You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
对于以下Java代码的运行结果描述正确的是( ) public class Test { private static final int flag=1; public static void main(String[] args) { for(inti=0;i<100;i++){ System.out.println(flag++); } } }
#59
对于以下Java代码的运行结果描述正确的是( )
A. 程序运行100次,分别输出0到99
B. 程序运行101次,分别输出0至100
C. 程序编译错误
D. 程序可能出现死循环
你的回答A 是错误的。预计是C,因为flag是final,不能修改
The text was updated successfully, but these errors were encountered: