I want to declare an ArrayList of type int.
ArrayList
int
Why does the following give me an error:
ArrayList list1 = new Array
int is a primitive. It is not a Object.
primitive
Object
Refer this link for further details.