I have a fairly simple problem. I am getting real-number input like6.03, but that gives me errors. If I change it to 6,03, it’s ok. I, however, can’t change the input I need to process, so how do I tell Java to use . as the delimiter instead of ,?
Scanner sc = new Scanner(System.in);
double gX = sc.nextDouble(); // Getting errors
Thanks
Scannercan be provided withLocaleto use, you need to specifyLocalethat uses.as decimal separator: