I do not understand what is wrong here:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cl = new Scanner(System.in);
double a = cl.nextDouble();
System.out.print(a);
}
}
I get this error whenever I type x.x:
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 Main.main(Main.java:5)