Tengo el siguiente error:
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 javaapplication2.JavaApplication2.main
El código es el siguiente:
Exception in thread "main"import java.util.InputMismatchExceptionScanner;
atpublic java.util.Scanner.throwForclass JavaApplication2{
public static void main(String []args){
Scanner w = new Scanner(System.java:864in);
at java.util int nom;
int cosa;
System.Scannerout.nextprintln(Scanner.java"Ingrese su nombre:1485");
at java.util.Scanner nom = w.nextInt(Scanner.java:2117);
at
java.util System.Scannerout.nextIntprintln(Scanner.java:2076"gckg");
at javaapplication2.JavaApplication2 cosa = w.mainnext();
}
}