When you call the toArray()
method on an ArrayList
of Character
s, for example, you get an array of Object
s instead of an array of Character
s. It’s odd. How do you convert a List
of specific objects into an array of objects of that particular type then? Or is there nothing to do other than simply recasting the return of the toArray()
method?
What do you mean by that?