You have to implement the readInt() in your customized stream reader if you don't have the jar/source file.

解决方案 »

  1.   

    readInt是InputStream提供的一个接口
    最后由DataInputStream来实现
    但是这个方法并不适合于从键盘输入
    至于为什么不向多说了
    请参考如下帖子:
    http://expert.csdn.net/Expert/topic/1395/1395003.xml?temp=.49107如果你想输入整数
    一般使用如下代码BufferedReader in = new BufferedReader( new InputStreamReader(System.in) );
    String s;try{
        s = in.readLine();
        int nInput = Integer.parseInt(s);
    }catch( IOException ex ){}