title: Entering a integer value using DataInputStream
body: <p>while using DataInputStream to enter any value, i have to press the enter key twice, if i enter any single digit number...and in the code snippet written below</p>
  
  <pre><code>public void print()
     {
         DataInputStream in = new DataInputStream(System.in);
         try
         {
             System.out.println("Enter a digit");
             int n=in.readInt();
             System.out.println(n);
          }
          .
          .
          .
          .
  </code></pre>
  
  <p>while printing the value of n it usually shows some unexpected value... using BufferedReader does not cause the same problem... </p>
  
  <p>When the value entered is 233, it shows 842216202 as the output... What can the possible error in the code be... Need help with this...</p>