您的位置:首页 > 其它

getting data from the keybroad

2014-10-04 15:17 323 查看
public static String getString()
throws IOException{
InputStreamReader isr =
new InoutStreamReader(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 static int getInt() throws IOException{
String s = getString();
return Integer.parseInt(s);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: