更新时间:2023-11-28 16:07:28
集合不是您想要的,因为:
A Set is not what you want, because:
一个更好的选择是列表,例如 ArrayList
,它允许任何(即重复)值,并且可以通过使用 list.get(i)。
A better choice is a List, such as an ArrayList
, which allows any (ie duplicate) values and can be accessed by index using list.get(i)
.