问题 set toArray

set有个toarray(T[])

怎么使是不对,报 java.lang.ArrayStoreException  这个错

有时间了要看下的



---20090726------晕菜为什么公司里面实现不了呢?
Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. Obeys the general contract of the Collection.toArray(Object[]) method.

Parameters:
a the array into which the elements of this set are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of this set.

你可能感兴趣的:(toArray)