Given: 1. import java.util.*; 2. public class Old { 3. public static Object get0(List list) { 4. return list.get(0); 5. } 6. } Which three will compile successfully? (Choose three.)

  1. Object o = Old.get0(new LinkedList());

  2. Object o = Old.get0(new LinkedList>());

  3. String s = Old.get0(new LinkedList());

  4. Object o = Old.get0(new LinkedList());

  5. String s = (String)Old.get0(new LinkedList());


Correct Option: A,D,E

Find more quizzes: