title: Why I had got inputMismatchException in the source?
body: <p>Why I have got inputMismatchException?
  When the inputs are only integer the result will be good, But when I use double inputs the compiler throw an inputMismatchException.</p>
  
  <pre><code>public static void main(String[] args) {
      // TODO Auto-generated method stub
      // Help by Sahil Muthoo
      System.out.println("Enter the radius and length of a cylinder:");
      Scanner sc = new Scanner(System.in);
      Pattern newlineOrSpace = Pattern.compile(System.getProperty("line.separator") + "|\\s");
      sc.useDelimiter(newlineOrSpace);
      double radius=sc.nextDouble();
      double length=sc.nextDouble();
      double area= radius*radius*Math.PI;
      double volume=area*length;
      System.out.println("The area is " + area);
      System.out.println("The volume is " + volume);
  }
  </code></pre>
  
  <p>Forexample inputs: 3 5  it will be good.</p>
  
  <p>Forexample inputs: 3.3 5  it will throw inputMismatchException</p>