输入无法暂缓。。。
程序代码:
import *; public class InRead { /** * @param args */ public static void main(String[] args) throws IOException { // TODO Auto-generated method stub BufferedReader keyin=new BufferedReader(new InputStreamReader(System.in)); String c; char a; System.out.print("input a character:\t"); a=(char)System.in.read(); System.out.println("The character you input is:\t"+a); System.out.println("Type Enter to continue..."); System.in.read(); System.out.print("input a String:"); c=keyin.readLine(); System.out.println("The String you input is:"+c); } } 结果却是input a character: e The character you input is: e Type Enter to continue... input a String:The String you input is:
我只输入了e,然后回车,还没有输入String呢,就全部跳出来了