Stumped on NoSuchMethodError
I am getting this error with choice 4 (1,2,3 and6 work fine):
Exception in thread "main" java.lang.NoSuchMethodError: EmployeeUtilities.weeklyPay(Ljava/util/ArrayList;)D
at Corporation.main(Corporation.java:77)
with the following code:
publicclass Corporation
{
//Begin menu choice switch
switch(choice)
{
case 1:salaryObj=(SalaryEmployee)employeeObj.salaryEmployee();
employeeCollection.add(salaryObj);
break;
case 2:hourlyObj=(HourlyEmployee)employeeObj.hourlyEmployee();
employeeCollection.add(hourlyObj);
break;
case 3:employeeObj.hoursWorked(employeeCollection);
break;
case 4:employeeObj.weeklyPay(employeeCollection);
break;
case 5:employeeObj.listEmployees(employeeCollection);
break;
case 6:another=false;
break;
default:System.out.println("\nThat input is not valid - Please choose 1 through 6 only!");
}//End switch
}
publicclass EmployeeUtilities
{
publicvoid weeklyPay(ArrayList tempArray)
{//DoStuff}
}
Am I blind or am I missing something stupid?
Thx in advance for any help.
P.S. - That code is obviously not complete but all objects seem ok as they work with the other choices....It is just the call that is failing.
Message was edited by:
LilWiz
Figured it out I guess....must have forgot a compile
Message was edited by:
LilWiz

