19 ms·
Or use Google Collections in Java 1.5 or higher. http://code.google.com/p/google-collections/ http://code.google.com/p/google-collections/ List<String> list1
by ericlavigne 17y ago
Or use Google Collections in Java 1.5 or higher.
http://code.google.com/p/google-collections/ http://code.google.com/p/google-collections/
List<String> list1 = Lists.newArrayList("item");
List<String> list2 = Lists.newArrayList("item1","item2");
Of course, none of these workarounds are close to what Java 7 offers. Just a few more months :-)
- vlisivka 17y ago> Or use Google Collections in Java 1.5 or higher. See Sandman reply.