Efrain Morales wrote:I think you could simply use something like String  para = myArrayList.toArray(); , as long as your ArrayList is declared as <String> type.
Not quite; the array returned by ArrayList.toArray() is always an Object. When you try to cast that to String you will get a ClassCastException. The following will work though:
As the Javadoc of Collection.toArray(T) says, it will make sure the runtime type of the returned array is the same as the type of the array argument.