Monthly Archives: May 2009

Static Java List Instantiation

But it recently occurred to me that with variable-length methods, I can simply call asList like this:

List<String> strings = Arrays.asList(foo","bar");