I am trying to convert Array list to String array but getting an exception. Can somebody please help me.
Size of ArrayList: 1
Size of String Array: 2
I am using the following code:
String[] StringArray ={};
StringArray = ArrayList.toArray(new String[ArrayList.size()]);
So, the length of StringArray
now is 1. But it should be 2. My problem is how can i convert arraylist to StringArray if String Array size is more than the ArrayList.
How can i do that? Please guys help me.