charliebaby
asked on
How do you fix this ? 1 error
Showing 1 error so far.
How do you fix this little code? Thanks
import java.text.DecimalFormat;
import javax.swing.JOptionPane;
public class MortgageCalculatorServiceR
{
public static void main(String[] args)
{
double loanAmount;//Declaring my Variables
double loanInterest;//Declaring my Variables
double monthlyPayment;//Declaring
double interestRate;
int loanTerm;
String totalLoan, interestLoan, termLoan;
DecimalFormat decimalPlaces=new DecimalFormat("0.00"); //Format decimal point for proper display
totalLoan=JOptionPane.show
loanAmount = Double.parseDouble(totalLo
interestLoan=JOptionPane.s
loanInterest = Double.parseDouble(interes
termLoan=JOptionPane.showI
loanTerm = Integer.parseInt(termLoan)
// calculations
monthlyPayment = (loanAmount * loanInterest) / (1 - Math.pow(1 + loanInterest, -loanTerm));//Formula for Monthly Payments
JOptionPane.showMessageDia
System.exit(0);
}}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.