Here is my Main method - calling Display. I am getting an error message, I don't know what I am missing. Any suggestions?

public class Student
{
  private int studentID;
  private double studentGPA;

 public Student()
    {
       studentID=100;
        studentGPA=3.0;
     }


    public Student(int id, double gpa)
       {

        studentID=id;
         studentGPA=gpa;
        }

   public void AssignValues(int id, double gpa)
         {
          studentID=999;
          studentGPA=3.75;
         }

  public void Display(int id, double gpa)
           {
             System.out.println("Student ID:"+" "+studentID);  

             System.out.println("Student GPA:"+" "+studentGPA); 

            }   
    }  




public class DisplayStudent
{

public static void main(String[] args)
{

Student IDNGPA = new Student();
IDNGPA.Display();



}

}

Error message: DisplayStudent.java:11: Display(int,double) in Student cannot be applied to ()
IDNGPA.Display();
^

You are calling the ethod without any arguments, but the method is designed to take an int and a double, so give it an int and a double.

commented: Great help - Thanks! +0
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.