Friday, 7 December 2012

Question 2


Given:


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? (Choose two.)
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]);


Check your Answer: BD

18 comments:

  1. Latest OCJP updates on https://www.facebook.com/OCJP6

    ReplyDelete
  2. 47C57CE684Jonathan83BD695BFF24 November 2024 at 17:26

    538F7D2A2C
    sanal show

    ReplyDelete
  3. 592D72AE77SloaneF0F0C0D2932 January 2025 at 22:45

    D5D92F5EFC
    garantili takipçi

    ReplyDelete