Using ArrayList<int>

int is a primitive data type and generics requires a class Integer is a wrapper class for int

1 Like