W
wang
Hi all,
I've tried to use Vector.toArray() to copy the content of a vector
to an array without success. The vector contains only object of
the class MyClass. I've made the following attempts:
MyClass[] arr = new MyClass[myVector.size()];
arr = (MyClass)myVector.toArray();
or:
arr = (MyClass[])myVector.toArray();
or:
arr = myVector.toArray(arr);
How should the method toArray() be used? Thanks in advance!
k.w.wang
I've tried to use Vector.toArray() to copy the content of a vector
to an array without success. The vector contains only object of
the class MyClass. I've made the following attempts:
MyClass[] arr = new MyClass[myVector.size()];
arr = (MyClass)myVector.toArray();
or:
arr = (MyClass[])myVector.toArray();
or:
arr = myVector.toArray(arr);
How should the method toArray() be used? Thanks in advance!
k.w.wang