Multiple Choice
Consider the following code snippet:
public static <E> void print(E[] a)
{
for (int i = 0; i < a.length; i++)
{
System.out.println(a[i] + " ") ;
}
}
int[] a = {3,6,5,7,8,9,2,3};
print(makeArray(a) ) ;
Assume that the method call to print(makeArray(a) ) works correctly by printing the int array a.Which of the following headers for the makeArray method will make this possible?
i.public static Integer[] makeArray(int[] a)
II.public static E[] makeArray(int[] a)
III.public static Integer[] makeArray(E[] a)
A) II and III only
B) I and III only
C) I and II only
D) I only
Correct Answer:

Verified
Correct Answer:
Verified
Q4: Consider the following code snippet:<br>public static <T>
Q5: Given the following declaration, what is the
Q6: Consider the following code snippet:<br>public class Box<E><br>{<br>private
Q7: To maintain compatibility with pre-generic Java, type
Q8: Which of the following statements about generic
Q10: Which of the following statements about generic
Q11: Consider the following code snippet:<br>public class Box<E><br>{<br>private
Q12: Suppose a linked-list class called MyLinkedList with
Q13: Which of the following satisfies the wildcard
Q14: Consider the following code snippet:<br>public class Box<E><br>{<br>private