Thursday, June 26, 2008

java — quick list from array


import java.util.Arrays;
import java.util.List;

public class Array
{
List<String> animals = Arrays.asList(new String[] {"lion", "tiger", "bear"});
}

No comments:

Post a Comment