This is your element array. It can convert to arraylist using thisUse the following code lines.
Element[]to convert an element array = {new Element(1), new Element(2), new Element(3)};
ArrayListelementArray=newinto an ArrayList(); for(int i=0;i<array.length;i++) {
Element[] array = {new Element(1), new Element(2), new Element(3)};
ArrayList<Element>elementArray=new ArrayList();
for(int i=0;i<array.length;i++) {
elementArray.add(array[i]);
}
}