… and the method returns the result. What is the actual Exception? The only way you can get that Exception is by entering something which is not a decimal number
Set interest and price: 1234567 1.23456
How do you get that method to work with integers and not with floating‑point numbers?
Set interest and price: $1234567 1.23456%
Jesper de Jong wrote:What exactly are you giving the program as input?
You're probably typing in something that cannot be parsed as a double. For example, you are typing in "3,2" instead of "3.2".
Funny thing is I acually was typing 3.2 with the correct (.) and not the (,). Then I decided to try the "wrong" (,) intstead and it worked! Hmmm?
Set interest and price: