I tried to execute your code and it works fine (I’m not sure about the formula and all but wrt programming, it’s fine).
Just as a check:
name the file as MortageCalculator.java
build as : javac MortageCalculator.java
execute as : java MortageCalculator
For ease in debugging, you can use a good IDE such as Eclipse. or at least notepad++
I tried to execute your code and it works fine (I’m not sure about the formula and all but wrt programming, it’s fine).
Just as a check:
name the file as MortageCalculator.java
build as : javac MortageCalculator.java
execute as : java MortageCalculator
For ease in debugging, you can use a good IDE such as Eclipse. or at least notepad++