欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > SCJP程序员认证考试

多项选择题

10. public class Bar { 
11.static void foo(int...x) { 
12. // insert code here 
13. } 
14. } 
Which two code fragments, inserted independently at line 12, will allow the class to compile?()

    A. foreach(x) System.out.println(z);
    B. for(int z : x) System.out.println(z);
    C. while( x.hasNext()) System.out.println( x.next());
    D. for( int i=0; i< x.length; i++ ) System.out.println(x[i]);

点击查看答案&解析
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题