Mega Code Archive

 
Categories / Java Book / 005 Collection
 

0305 Convert Vector to Array

Object[] toArray() Returns an array containing all of the elements in this Vector in the correct order. <T> T[] toArray(T[] a) Returns an array containing all of the elements in this Vector in the correct order; the runtime type of the returned array is that of the specified array. String toString() Returns a string representation of this Vector, containing the String representation of each element. Revised from Open JDK source code