-1

I have an array that is initialized like this:

Element[] array = {new Element(1), new Element(2), new Element(3)};

How do I to convert this array into an ArrayList object?

jotik
  • 17,044
  • 13
  • 58
  • 123

1 Answers1

1

You can simply use Arrays.asList(array) to create an ArrayList of your array.

Kagemusha
  • 288
  • 2
  • 16