除了Java collection class/interface外,方便的有Google guava的utility class: Lists/Sets/Maps/Queues, 用它们可以方便地创建List等object。
List<String> list = Lists.newArrayList(); or Lists.newArrayList("1", "2");
[Java Basics] Collection,布布扣,bubuko.com
时间: 2024-10-14 11:43:30