why to intia;ize object as as list and create new object of arraylist code example
Example: initialize arraylist
ArrayList<Type> list = new ArrayList<Type>(Arrays.asList(
elem1, elem2,..., elemN
));
ArrayList<Type> list = new ArrayList<Type>(Arrays.asList(
elem1, elem2,..., elemN
));