DataInputStream in = new DataInputStream(System.in);
in.readInt();

解决方案 »

  1.   

    DataInputStream in = new DataInputStream(System.in);
    in.readShort();
      

  2.   

    DataInputStream in = new DataInputStream(System.in)
    in.readShort()
      

  3.   

    大哥不行也!我试了一下,
    import java.io.DataInputStream;public class t {
        public static void main( String[] args ) {
         DataInputStream dis = new DataInputStream( System.in );
        
         short s, j;
        
         try {
         System.out.print( "s? " );
             s = dis.readShort();
             System.out.print( "j? " );
             j = dis.readShort();
            
             System.out.println( "s = " + s + "j = " + j );
          } catch ( Exception e ) {
          System.out.println( "an error occured" );
          }
        }

    }
    结果不对啊!
      

  4.   

    public String readConsole() throws Exception 
       {
          // Create a buffered reader with System.in, then
          // read a line from it.
          BufferedReader breader;
          breader = new BufferedReader(new InputStreamReader(System.in));
          return breader.readLine();
       }
      

  5.   

    what number did u input?
      

  6.   

    是不对
    我搞错了System.in读出都字符码
      

  7.   

    what number did u input?