by rtg · 15y ago · 0 comments
List<String> people = ImmutableList.of("Frank", "Mary", "Bob");
There's also ImmutableSet and many other goodies, to say the least. For instantiation of these generic types, you can do: List<String> people = Lists.newArrayList();
Map<String,Integer> scores = Maps.newHashMap();
and so on. List<String> people = Arrays.asList("Frank", "Mary", "Bob");
[1] http://download.oracle.com/javase/1.5.0/docs/api/java/util/A...