try{
// end do
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
str=in.readLine();
}catch(java.io.IOException e){};
return str;
这样写程序根本就不停住啊?一闪就过去了,怎么才能让他等待用户输入呢??
// end do
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
str=in.readLine();
}catch(java.io.IOException e){};
return str;
这样写程序根本就不停住啊?一闪就过去了,怎么才能让他等待用户输入呢??
解决方案 »
- 一个SWT做的Browser的多线程问题。谢谢
- 关于oracle数据库的实例名
- myeclipse文本编辑器如何字体设置
- 请教如何实现不允许多人同时调用同一个实例?
- 怎么查看,一个list中有几个指定的类对象?
- 接口的问题
- 新手请教一个问题
- hashtable一问
- 从那可以下载visual j++6.0
- 谁是这的高手亚?有人知道吗?
- console如何清屏???
- initialization error: com.borland.compiler.symtab.LoadError: java.io.IOException: class not found: class java.lang.Object
public class SystemIOMain{
public static void main(String args[]){
try{
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Input your name:");
String getInput = read.readLine();//从控制台读取一行信息
System.out.println(getInput);
read.close();
}catch(IOException e){}
}
}