标签:world str ati blog 语句 rac ack java main
输入的字符不是回车就重新输入:
import java.io.IOException; public class HelloWorld { public static void main(String[] args) { try { while ((char)(System.in.read()) != ‘\n‘) { ; } } catch (IOException e) { e.printStackTrace(); } } }
标签:world str ati blog 语句 rac ack java main
原文地址:http://www.cnblogs.com/BaiLaowu/p/6753311.html