how to create an arraylist with intial values java code example Example: arraylist with values List<String> x = new ArrayList<>(Arrays.asList("xyz", "abc"));