How to use Readline() in Java
<p>I am a beginner in Java and I was reading the topic of giving values to variables through <strong>ReadLine()</strong> method from the keyboard and the program for that given in book is as follows </p>

<pre><code>import java.io.DataInputStream  
class Reading  
{ 
 public static void main(String args[]) 
 {
   DataInputStream in = new DataInputStream(**System.in**);
   int intnumber=0;
   float floatnumber=0.0f;
 try { 
   system.out.println("enter an integer: ");
   intnumber = Integer.parseInt(**in.Readline()**);

   system.out.println("enter a float number: ");
   floatnumber = Float.valueOf(in.Readline()).floatvalue();
}
</code></pre>

<p>I want to ask following Questions ,</p>

<ol>
<li><p>what is done in this statement</p>

<p><code>DataInputStream in = new DataInputStream(**System.in**);</code></p>

<p>If <strong>in</strong> is an object of <strong>DataInputStream</strong> then What is new and what the statement on Right hand side of above statement do?</p></li>
<li><p>Why Different methods have been used for putting the integer value
into intnumber and   float value into floatnumber </p></li>
</ol>
