Is there a command in java for conversion of an ArrayList into a object array. I know how to do this copying each object from the arrayList into the object array, but I was
Convert an ArrayList to an object array
ArrayList has a constructor that takes a Collection, so the common idiom is:
List list = new ArrayList(Arrays.asList(array));
Which constructs a copy of the list created by the array.
now, Arrays.asList(array) will wrap the array, so changes to the list
will affect the array, and visa versa. Although you can't add or remove