Return | Method | Summary |
---|---|---|
void | copyInto(Object[] anArray) | Copies the components of this vector into the specified array. |
import java.util.Arrays;
import java.util.Vector;
public class Main{
public static void main(String args[]) {
Vector v = new Vector();
v.add("java2s.com");
v.add("java2s.com");
v.add("java2s.com");
Object[] arr = new Object[v.size()];
v.copyInto(arr);
System.out.println(Arrays.toString(arr));
}
}
The output:
[java2s.com, java2s.com, java2s.com]
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |