0
我想实现如下:询问的InputStream“System.in”
BufferedInputStream is = new BufferedInputStream(System.in);
int c = 0;
while((c=is.read())!=-1)
Files.copy(is, path3, StandardCopyOption.REPLACE_EXISTING);
Hoewver它陷在等待System.in永远.. 什么解决办法是什么?
在此先感谢。
它不能在构造块。你的意思是'is.read()'? –
这是阻止试图从控制台读取..你键入任何输入? –
你是否在控制台按'return'?在此之前,'System.in'看不到任何输入。 –