How to copy vector to array? 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.

mujer soltera mexicana 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); } } }

citation homme cherche femme Bonuses Output:

partnersuche kostenlos mit telefonnummer

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