Not getting user input as required in Java
<p>I am new to java but not to programming as I know C++. </p>

<p>I am simply trying to get input from user either of integer or string form but when i execute my program, it just stands still and does nothing until I press enter. 
My program and result after pressing "Enter" is given. </p>

<p>My question is "<strong>why I am not getting user input?</strong>"  </p>

<pre><code>    import java.util.Scanner;

    class roomarea
    {
        public static void main(String[] args)
        {
            Scanner scanner = new Scanner(System.in);
            int input = scanner.nextInt();
            System.out.println("Enterd value is " + input);
        }
    }  
</code></pre>

<p>the result is </p>

<pre><code>Start Running math &gt;Command: "C:\Program Files\Java\jdk1.6.0\bin\java.exe"    
-classpath "C:\Documents and Settings\Ahmad Abdullah\My Documents\NaviCoder IDE for    
Java\projects\math\output\classes";"C:\Program Files\Java\jdk1.6.0\jre\lib\rt.jar";    
roomarea 

Exception in thread "main" java.util.InputMismatchException at
    java.util.Scanner.throwFor(Scanner.java:840)    at    
    java.util.Scanner.next(Scanner.java:1461)   at    
    java.util.Scanner.nextInt(Scanner.java:2091)    at    
    java.util.Scanner.nextInt(Scanner.java:2050)    at 
    roomarea.main(Main.java:14)  &gt;Run
</code></pre>

<p>Process Completed</p>
