public static <T> List<T> asList(T... a) { return new ArrayList<T>(a);}
This is the implementation of Arrays.asList
, so you could go with
ArrayList<String> arr = (ArrayList<String>) Arrays.asList("1", "2");
public static <T> List<T> asList(T... a) { return new ArrayList<T>(a);}
This is the implementation of Arrays.asList
, so you could go with
ArrayList<String> arr = (ArrayList<String>) Arrays.asList("1", "2");