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
According with the question the answer using java 1.7 is:
ArrayList arraylist = new ArrayList(Arrays.asList(array));
However it's better always use the interface:
List arraylist = Arrays.asList(array);