0

Hi there! So I did this yesterday in class using Grasg, every thing is good. But when i go home and re-do again using JEdit & Terminal cause I'm using Mac. And keep having 1 error that I can't fix, please help! Thx

//Lab 2- Find Monthly morgage Payment 
//File: Mortgage.java
//Programmer: Tracy Do

import java.text.*;   //requirement

public class Mortgage
{
    public static void main(String[] args);
    {
    DecimalFormat num=new DecimalFormat("$,###.00");  //declaring Mortgage $.

double P= 100000;  //mortgage Principal.
double I = 0.07;  //7% mortgage Interest.
double T= 30;  //30 years mortgage Term.

double MP = (P*(I/12)) / (1-Math.pow((1/(1+(I/12))),(T*12)));  //Monthly Mortgage Payment
                                                               //Display variables


        System.out.println("The Monthly Mortgage Payment is: "+ num.format(MP));

    }
}

----------------------------------------------------------------------------------
On my Terminal window says:

1 error
tracy-dos-imac:lab2 tracydo$ javac Mortgage.java
Mortgage.java:9: missing method body, or declare abstract

public static void main(String[] args);
                   ^

1 error
tracy-dos-imac:lab2 tracydo$

Edited by Reverend Jim: Fixed formatting

Votes + Comments
Does not deserve down vote, user stated problem and code
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by BestJewSinceJC
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.