JavaIO之标准输入输出(一)

来源:互联网 发布:mac pro type c 编辑:程序博客网 时间:2024/05/17 08:41
package three.day.io;


import java.io.IOException;
import java.io.PrintStream;




public class f2 {

public static void main(String[] args) throws IOException {
int a;
while((a=System.in.read())!=-1)
{
if(a == '\t') System.exit(0);
//System.out.write(a);
PrintStream ps = new PrintStream(System.out);
ps.write(a);
}

}


}
原创粉丝点击