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$

ztini commented: Does not deserve down vote, user stated problem and code +1

you put a ; after the main method. Erase the semicolon.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.