java creating new arraylist with item code example
Example 1: java create arraly list
List<String> words = new ArrayList<String>();
Example 2: arraylist with values
List<String> x = new ArrayList<>(Arrays.asList("xyz", "abc"));
List<String> words = new ArrayList<String>();
List<String> x = new ArrayList<>(Arrays.asList("xyz", "abc"));