本帖最后由 完美恋爱 于 2013-10-17 12:17 编辑
import java.io.*;
class My
{
public static void main(String[] args) throws IOException
{
InputStream in = System.in;
InputStreamReader isr = new InputStreamReader(in);
BufferedReader bufr = new BufferedReader(isr);
OutputStream out = System.out;
OutputStreamWriter osw = new OutputStreamWriter(out);
BufferedWriter bufw = new BufferedWriter(osw);
String line = null;
while((line = bufr.readLine()) != null)
{
if("over".equals(line))
break;
bufw.write(line.toUpperCase());
bufw.newLine();
bufw.flush();
}
bufr.close();
}
}
比如我在控制台上敲abc,为什么输出的结果是大写的ABC啊?
|