标签:trace buffered equal new ring 控制台 style case 打印
import java.io.*; public class TestInputStreamReader{ public static void main(String[] args){ try{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String str = null; while(!(str = br.readLine()).equalsIgnoreCase("exit")){ System.out.println(str); } br.close(); } catch(IOException e){ e.printStackTrace(); } } }
测试InputStreamReader的demo(转换流),将控制台输入内容打印在控制台上
标签:trace buffered equal new ring 控制台 style case 打印
原文地址:https://www.cnblogs.com/yxfyg/p/12400781.html