This question already has an answer here:
I'm working in the android environment and have tried the following code, but it doesn't seem to be working.
String [] stockArr = (String[]) stock_list.toArray();
If I define as follows:
String [] stockArr = {"hello", "world"};
it works. Is there something that I'm missing?
</div>
转载于:https://stackoverflow.com/questions/5374311/convert-arrayliststring-to-string-array