How might I convert an ArrayList object to a String[] array in Java?
ArrayList
String[]
private String[] prepareDeliveryArray(List deliveryServices) { String[] delivery = new String[deliveryServices.size()]; for (int i = 0; i < deliveryServices.size(); i++) { delivery[i] = deliveryServices.get(i).getName(); } return delivery; }