What is wrong with my code? Why can't I use the double variable?
I was making a code where you can create your own fighter (not done yet), choosing the name, last name, age, height, specialty, etc. But when i was making a method in a class that was reading a variable of double type, the compiler said something was wrong with my code, like an error in the file or something. Can something tell me why is this happening and how can I solve this? Here is my code: https://code.sololearn.com/crfWk59iu4b4/?ref=app Here is the error message: Exception in thread "main" java.util.InputMismatchException at java.base/ java.util.Scanner.throwFor(Scanner.java : 939) at java.base/ java.util.Scanner.next(Scanner.java : 1594) at java.base/ java.util.Scanner.nextDouble(Scanner.java : 2564) at Fighter.Fighter_Inscription(Fighter.java : 18) at Program.main(Program.java : 8) (I don't speak english, so i'm sorry if I wrote something wrong...)