title: I having problem getting input by scanner from java console
body: <p>I'm using on program that I need get input from console in java. here is a simple code only for showing you the problem.
      public class Main {</p>
  
  <pre><code>public static void main(String args[])
  {
      // Using Scanner for Getting Input from User
      Scanner in = new Scanner(System.in);
  
      String s = in.nextLine();
      System.out.println("You entered string "+s);
  
      int a = in.nextInt();
      System.out.println("You entered integer "+a);
  
      float b = in.nextFloat();
      System.out.println("You entered float "+b);
      System.out.println();
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>for input :</p>
  
  <pre><code>"stackOverFlow"
  12
  3.4
  </code></pre>
  
  <p>out put is :
  You entered string stackOverFlow
  You entered integer 12</p>
  
  <p>and out put should be :
  You entered string stackOverFlow
  You entered integer 12
  You entered float 3.4</p>
  
  <p>what is the problem why the last line don't be read by scanner ?</p>