how to initialize arraylist with values code example
Example 1: arraylist with values
List<String> x = new ArrayList<>(Arrays.asList("xyz", "abc"));
Example 2: initialize arraylist
ArrayList<Type> list = new ArrayList<Type>(Arrays.asList(
elem1, elem2,..., elemN
));