Scanner double value – InputMismatchException
You should precise a Locale for your Scanner. Scanner scanner = new Scanner(System.in).useLocale(Locale.US); From the doc : An instance of this class is capable of scanning numbers in the standard formats as well as in the formats of the scanner’s locale. A scanner’s initial locale is the value returned by the Locale.getDefault() method; it may … Read more