initialize arraylist with array of int in java code example
Example 1: arraylist with values java
ArrayList<String> cities = new ArrayList<>(Arrays.asList("London", "Tokyo", "New York"));
Example 2: arraylist with values
List<String> x = new ArrayList<>(Arrays.asList("xyz", "abc"));