当然可以啊 直接录入一行信息啊
//从控制台输入文件,打印在控制台上
public static void keyToCom() throws IOException
{
BufferedReader bufr = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bufw = new BufferedWriter(new OutputStreamWriter(System.out));
String str = null;
while((str=bufr.readLine())!=null)
{
if(str.equals("over"))
break;
bufw.write(str.toUpperCase());
bufw.newLine();
bufw.flush();
}
bufw.close();
bufr.close();
} |