import java.util.Vector;Runtime:
public class VectorToArray {
public static void main(String[] args) {
Vector<文字列>vct = new Vector です<文字列>();
//要素を追加
vct.add("un");
vct.add("2");
vct.add("three");
vct.add("4");
System.out.println("ベクトル:");
for(String e:vct)
System.out.println(e);
文字列[] copyArr = new String[vct.size()];
vct.copyInto(copyArr);
System.out.println("コピーされたアイテム:");
for(String e:copyArr){
System.out.println(e);
}
}
}
Vector:
one
two
threebr />four<
コピーされたアイテム:
one
two
three
four
Please disable your ad blocker and refresh the window to use this website.