0
How to change "," to "." in the terminal.
Having coded a simple cash register in java within blueJ, each time i want to enter decimal numbers with a "." it crashes. It would be really useful considering that the numpad has it close. Thank you!
1 Réponse
+ 14
The code you published works for doubles...
If you want to use "," as a decimal separator, use nextLine to accept a string. After that, use String's replace method to replace "," by "." and cast it to double.