Friday, October 7, 2011

Quiz of the day | OCPJP (32)

Given:

1. class Pocong {
2. public static void main(String[] args) {
3. doStuff(8);
4. doStuff(8,9);
5. }
6. // insert code here
7. }

Which, inserted independently at line 6, will compile? (Choose all that

apply.)

A. static void doStuff(int... doArgs) { }
B. static void doStuff(int[] doArgs) { }
C. static void doStuff(int doArgs...) { }
D. static void doStuff(int... doArgs, int y) { }
E. static void doStuff(int x, int... doArgs) { }


DOWNLOAD the answer

0 comments: