I'm not sure I understand what you want, but I find it convenient to use the toArray( exampleArray ) method. For instance, this fragment reads lines to an ArrayList but returns a
String[]
If you hand toArray an array of the right size, it fills in the elements, casting to the array type.
Bill