title: DataInputStream deprecated readLine() method
body: <p>I am on java 6. Using <code>DataInputStream in = new DataInputStream(System.in);</code> to read user input. When the readLine() is deprecated. What is the work around for reading user value?</p>
  
  <pre><code>DataInputStream in = new DataInputStream(System.in);
  int num;
  try
  {
    num = Integer.parseInt(in.readLine()); //this works
  
    num = Integer.parseInt(in);  //just in doesnt work.
  }
  catch(Exception e)
  {
  }
  </code></pre>
  
  <p>please explain as it should when the readLine() is deprecated.</p>