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
Already everyone has provided enough good answer for your problem. Now from the all suggestions, you need to decided which will fit your requirement. There are two types of collection which you need to know. One is unmodified collection and other one collection which will allow you to modify the object later.
So, Here I will give short example for two use cases.
Immutable collection creation :: When you don't want to modify the collection object after creation
List
Mutable collection creation :: When you may want to modify the created collection object after creation.
List