Examveda

What is the result of the following Java code?
List list = new ArrayList<>();
list.add(new Object());

A. Runtime error

B. Successful addition

C. Compilation error

D. No output

Answer: Option C


This Question Belongs to Java Program >> Generics In Java

Join The Discussion

Related Questions on Generics in Java