📄 vector2.java
字号:
import java.util.*;
import java.io.*;
public class Vector2{
static void displayVector(Vector v){
System.out.println("\n-------格废-------");
for(int i=0;i<v.size();i++){
System.out.print(v.elementAt(i)+" ");
}
System.out.println("\n------------------\n");
}
public static void main(String[] args) throws IOException{
Vector v=new Vector();
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String select;
while(true){
System.out.println("<< 1.眠啊 2.昏力 3.辆丰 >>");
System.out.println("急琶窍技夸....");
select=br.readLine();
if(select.equals("1")){
System.out.println("眠啊且 巩磊凯阑 涝仿窍技夸.");
v.add(br.readLine());
displayVector(v);
}
else if(select.equals("2")){
System.out.println("夸家狼 锅龋甫 涝仿窍技夸(0何磐 矫累).");
v.removeElementAt(Integer.parseInt(br.readLine()));
displayVector(v);
}
else if(select.equals("3"))break;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -