How to copy vector to array?

follow site We can copy all elements of a vector object to an array. By passing an array object to copyInto() method, We can copy content of a vector object to an array.

stargate sg1 episode rencontre asgard package test; import java.util.Vector; public class VectorToArray { public static void main(String a[]){ Vector<String> vct = new Vector<String>(); //adding elements to the end vct.add("Selenium"); vct.add("Java"); vct.add("UFT"); vct.add("Other"); System.out.println("Actual vector:"+vct); String[] copyArr = new String[vct.size()]; vct.copyInto(copyArr); System.out.println("Copied Array content:"); for(String str:copyArr){ System.out.println(str); } } } see Output:


follow link Actual vector:[Selenium, Java, UFT, Other] Copied Array content:

dating douchebags