键盘输入
BufferedReader bufr = new BufferedReader(new InputStreamReader(System.in));
分开写也就是
// 获取键盘录入对象
// InputStream in = System.in;
//
// //将字节流对象传承字符流对象,使用转换流 InputStreamReader
// InputStreamReader isr = new InputStreamReader(in);
//
// //为了提高效率,将字符串进行缓冲区技术高效操作,使用BufferedReader
// BufferedReader bufr = new BufferedReader(isr);
屏幕显示
BufferedWriter bufw = new BufferedWriter(new OutputStreamWriter(System.out));
分开写
// OutputStream out = System.out;
// OutputStreamWriter osw = new OutputStreamWriter(out);
// BufferedWriter bufw = new BufferedWriter(osw);
|
|