While runnnig the code this error is produced
Employee cannot be applied to given types;
required: no arguments
found: java.lang.String,double,int
reason: actual and formal argument lists differ in length
Main Class:
public class Salary {
public static void main(String[] args) {
Employee worker = new Employee("harry",5.5,45);
System.out.println(worker.getEmployeeName());
System.out.println("Your Gross Salary is"+ worker.getGrossSalary());
System.out.println("after tax is"+ worker.getNetSalary());
}
}
Constructor form the class Employee:
public void Employee(String n , double pr, int h){
name = n;
payRate = pr;
hours = h;
}