The method toArray() converts to the type Object[] and this cannot be cast down to String[].
You have to provide an argument to the method specifying the type such as toArray(new String[size]) where size can be specified as the same, smaller than or greater than depending on your needs
From the API:
array param - the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.