The Collection framework consists of the interfaces (List, Set, Map) and their subclasses.
You cannot use primitive values for the elements of a Collection.
<Sample>
List
for (int i = 0; i <>
list.add(new Integer(i));
}
for (int i = 0; i <>
System.out.println(list.get(i));
}
<Result>
0
1
2
3
4