問題詳情

138Which two code fragments are most likely to cause a StackOverflowError? (Choose two.)  1. int[] x = {1, 2, 3, 4, 5};for(int y=0; y<6; y++)System.out.println(x[y]);   2. static int[] x = {7, 6, 54};static{x[1] = 8; x[4] = 3;}  3. for(int y=10; y<10; y++)doStuff(y);  4. void doOne(int x){doTwo(x);}void doTwo(int y){doThree(y);}void doThree(int z){doTwo(z);}  5. for(int x=0; x<1000000000; x++)doStuff(x);  6. void counter(int i){counter(++i);}
(A) 12
(B) 46
(C) 23
(D) 156

參考答案

無參考答案

內容推薦

內容推薦