让我总结一下并添加一些内容:
JDK
1. new ArrayList();
2. Arrays.asList("A", "B", "C")
番石榴
1. Lists.newArrayList("Mike", "John", "Lesly");
2. Lists.asList("A","B", new String [] {"C", "D"});
不可变列表
1. Collections.unmodifiableList(new ArrayList(Arrays.asList("A","B")));
2. ImmutableList.builder() // Guava
.add("A")
.add("B").build();
3. ImmutableList.of("A", "B"); // Guava
4. ImmutableList.copyOf(Lists.newArrayList("A", "B", "C")); // Guava
空的不可变列表
1. Collections.emptyList();
2. Collections.EMPTY_LIST;
字符列表
1. Lists.charactersOf("String") // Guava
2. Lists.newArrayList(Splitter.fixedLength(1).split("String")) // Guava
整数列表
Ints.asList(1,2,3); // Guava