输入字符串
public static String getString() throws IOException{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String s = br.readLine();
return s;
}
输入字符
public static char getChar() throws IOException{
String s = getString();
return s.charAt(0);
}
输入整数
public int getInt() throws IOException{
String s = getString();
return Integer.parseInt(s);
}
输入浮点型数
public int getDouble() throws IOException{
String s = getString();
Double aDub = Double.valueOf(s);
return aDub.doubleValue();
}