Choose the correct option based on this program:.
import java.util.*; public class Main { public static void main(String []args) { List<int> intList = new ArrayList<>(); intList.add(10);/*from w w w . j ava 2s.c o m*/ intList.add(20); System.out.println("The list is: " + intList); } }
C.
You cannot specify primitive types along with generics, so List<int> needs to be changed to List<Integer>.