There are several ways of creating ArrayList from array in Java-
Suppose we have-
Element[]
array = { new Element(1),
new Element(2), new Element(3)};
, hence, the ArrayList can be created as follows-
ArrayList<Element> arraylist_1 = new ArrayList<>(Arrays.asList(array));
ArrayList<Element> arraylist_2 = new ArrayList<> (Arrays.asList(new Element[] {new Element(1), new Element(2), new Element(3) }));
ArrayList<Element> arraylist_3 = new ArrayList<>();
Collections.addAll(arraylist_3, array);
You may go for one of the simplest ways which is as follows:
String[] Array={"one", "two", "three"};
ArrayList<String> s1 = new ArrayList<String>(Arrays.asList(Array1));