Java集合只存储对象,而不是基本类型; 但是我们可以存储包装类.
为什么这个约束?
java collections types primitive-types
collections ×1
java ×1
primitive-types ×1
types ×1