title: Online compiler vs native compiler
body: <pre><code>import java.util.Scanner;
  public class Count {
         public static void main(String []args){
         Scanner s=new Scanner(System.in);
         int i=s.nextInt();
         int j=i+1;
         System.out.println(j);
      }
  
  }
  </code></pre>
  
  <p>It's basic code in java,When i ran it on my own PC it worked fine,The same code i compiled and executed on <a href="http://www.compileonline.com/compile_java_online.php" rel="nofollow">Online compiler</a> ,it gives some error why??</p>
  
  <pre><code>Exception in thread "main" java.util.NoSuchElementException
      at java.util.Scanner.throwFor(Scanner.java:907)
      at java.util.Scanner.next(Scanner.java:1530)
      at java.util.Scanner.nextInt(Scanner.java:2160)
      at java.util.Scanner.nextInt(Scanner.java:2119)
      at Count.main(Count.java:28) 
  </code></pre>