This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Arrays.asList("Rod", "Jane", "Freddy");
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
I think that the Arrays.* methods are not that well known among Java developers.
I still mainly see people write:
List<String> list = new ArrayList<String>();
list.add("Rod");
list.add("Jane");
list.add("Freddy");
instead of the asList method that was put into JDK 1.4:
List<String> list = Arrays.asList<String>("Rod", Jane", Freddy");