import java.util.Vector;Laufzeit:
public class VectorToArray {
public static void main(String[] args) {
Vector< String> vct = neuer Vektor< String> ();
//Elemente hinzufügen
vct.add("un");
vct.add("zwei");
vct.add("drei");
vct.add("four");
System.out.println("Vektor:");
for(String e:vct)
System.out.println(e);
String[] copyArr = new String[vct.size()];
vct.copyInto(copyArr);
System.out.println("Kopierte Elemente:");
for(String e:copyArr){
System.out.println(e);
}
}
}
Vector:
one
two
three
four
Kopierte Artikel:
one
two
three
four
Please disable your ad blocker and refresh the window to use this website.