为什么会报“不兼容的类型”错误?
程序如下:import java.util.*;
import java.io.*;
public class Vector2{
static void displayVector(Vector v){
System.out.println("------Detail------");
for(int i=0;i<v.size();i++)
System.out.println(v.elementAt(i));
System.out.println("------------------");
}
public static void main(String args[]) throws IOException{
Vector v = new Vector();
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String select;
while(true){
System.out.println("<<1.Add 2.Del 3.Exit>>");
System.out.println("Please select ...");
select = br.readLine();
switch(select){
case "1":
System.out.println("Input the string to add:");
v.add(br.readLine());
displayVector(v);
break;
case "2":
System.out.println("Input the index to delete:");
v.removeElementAt(Integer.parseInt(br.readLine()));
displayVector(v);
case "3":
break;
default:
}
}
}
}