java how to make an arraylist with default values 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"));