import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter your name: ");
int name = in.nextInt();
}
}
error
Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
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 Main.main(Main.java:6)
could not use scanner class in this editor