Examveda
Examveda

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

A. Compilation error

B. Runtime error

C. Successful addition

D. No output

Answer: Option A


This Question Belongs to Java Program >> Generics In Java

Join The Discussion

Related Questions on Generics in Java