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
We can easily convert an array to ArrayList. We use Collection interface's addAll() method for the purpose of copying content from one list to another.
ArrayList
addAll()
Arraylist arr = new Arraylist(); arr.addAll(Arrays.asList(asset));