Java collections only store Objects, not primitive types; however we can store the wrapper classes.
Why this constraint?
There is the concept of auto-boxing and auto-unboxing. If you attempt to store an int in a List<Integer> the Java compiler will automatically convert it to an Integer.
int
List<Integer>
Integer