- package com.itheima;
- import java.io.*;
- public class Test74 {
- public static void main(String[] args)throws
- IOException {
- // TODO 自动生成的方法存根
- BufferedReader buffr= new BufferedReader(new
- InputStreamReader(System.in));
- BufferedWriter buffw= new BufferedWriter(new
- OutputStreamWriter(System.out));
- String len = null;
- while((len = buffr.readLine())!=null){
- if("over".equals(len))
- break;
- buffw.write(len);
- buffw.newLine();
- buffw.flush();
- }
- buffr.close();
- }
- }
复制代码 我用EclipseBufferedReader buffr= new BufferedReader(new
InputStreamReader(System.in));这里老有问题,构造函数未定义;用cmd 运行就行 没有错误
|
|