is there a better alternative to List<T> initalization than invoking Arrays.asList?

Viewed 6151

Is there a better alternative to using Arrays.asList as a List bulk initializer? Of concern is that this one is verbose and involves an extraneous class and method.

List<Double> myList = new ArrayList<Double>(Arrays.asList(3.01d, 4.02d, 5.03d));

Edit: This question pertains to a bulk initialization which would usually have more than the three values shown in the example.

6 Answers
Related