i can't input float number in intellij

Answered

0
3 comments

This has nothing to do with Intellij, you are missing scanner.nextLine() between line 10 and 11

0
Avatar
Permanently deleted user

it works for int numbers 

 

0

You may try with different decimal separators (comma for example). It depends on locale. See this thread for details:

https://stackoverflow.com/questions/5054132/how-to-change-the-decimal-separator-of-decimalformat-from-comma-to-dot-point

Please also note that the issue is not related to IntelliJ IDEA and the output is the same in the command line. That is why it is better to ask such questions on general forums like StackOverflow. 

0

Please sign in to leave a comment.