题库 软件开发 题目列表 main程序输出: public class Main {     public s...
单选题
main程序输出:
public class Main {
    public static void main(String[] args) {
        int i = 0;
        int res = 1;
        while(true) {
            try {
                res += res / (i++);
                System.out.println("No exception");
            } catch(Exception e) {
                System.out.println("Zero exception");
            } finally {
                System.out.print("In finally clause");
                System.out.println(i);
                if (i == 2) break;
            }
        }
    }
}

A.
No exception

In finally clause1

No exception

In finally clause2
B.
Zero exception

In finally clause1

No exception

In finally clause2
C.

Dead loop.....

D.
Zero exception

No exception

In finally clause2
题目信息
校招真题
-
正确率
0
评论
18
点击