define list in java with values code example
Example: arraylist with values java
ArrayList<String> cities = new ArrayList<>(Arrays.asList("London", "Tokyo", "New York"));
ArrayList<String> cities = new ArrayList<>(Arrays.asList("London", "Tokyo", "New York"));