代码
//键盘输入,返回字符串
public String inputFromKeyBoard(){
String str=null;
try{
InputStreamReader inputReader;
BufferedReader bufReader;
inputReader = new InputStreamReader(System.in);
bufReader = new BufferedReader(inputReader);
str = bufReader.readLine();
}catch(IOException e){
e.printStackTrace();
}
return str;
}
//*****************************************************************************