package test;
import java.util.*;
public class NewClass {
public static void main (String[] args)
{
String s;
Scanner sc = new Scanner (System.in);
s=sc.nextLine();
System.out.println(s);
}
}
I don't know why this error is coming.
Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:864) at java.util.Scanner.next(Scanner.java:1485) at java.util.Scanner.nextInt(Scanner.java:2117) at java.util.Scanner.nextInt(Scanner.java:2076) at test.Test.main(Test.java:12) C:\Users\MOHIT KUMAR SINGH\AppData\Local\NetBeans\Cache\8.2\executor-
snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 2 seconds)