0

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...)

15th Jul 2019, 3:18 AM
SrSmith
SrSmith - avatar
1 ответ
0
please refer to this resource as it may help... I don't speak Portuguese so well... https://beginnersbook.com/2013/12/linkedlist-in-java-with-example/
15th Jul 2019, 3:35 AM
BroFar
BroFar - avatar