I have an array that is initialized like:
Element[] array = {new Element(1), new Element(2), new Element(3)};
I would like to convert this
Another update, almost ending year 2014, you can do it with Java 8 too:
ArrayList arrayList = Stream.of(myArray).collect(Collectors.toCollection(ArrayList::new));
A few characters would be saved, if this could be just a List
List
List list = Stream.of(myArray).collect(Collectors.toList());