代码如下:
public class Test {
public static void main(String[] args)
{
try
{
int c;
while((c = System.in.read())!=-1)
{
System.out.write(c);
}
}
catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}输入:bc
输出 bc
------解决方案--------------------
你看api的话 他上面的解释就是将指定的字节写入此输出流。