DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Convert Single Object To List
Works with varargs in Java 1.6
List<String> list = java.util.Arrays.asList("foo");






Comments
replied on Sat, 2008/02/02 - 6:34pm
List list = java.util.Collections.singletonList("foo");