One of my most often asked questions :) You will find the problem explained here:
http://helpdesk.objects.co
So what you need to do create an instance of Payroll1 and call its setters to sassign the various vaules
System.out.println("Please
Payroll1 payroll = new Payroll1(userInput.nextLin
System.out.println("Please
payroll.setEmployeeID(user
I'll leave the rest for you to sort out, let me know if you get stuck
Main Topics
Browse All Topics





by: AgentC4Posted on 2009-08-05 at 20:32:15ID: 25029937
these are my errors
Payroll1.java:74: non-static variable EmployeeName cannot be referenced from a static context
EmployeeName = userInput.nextLine();
^
Payroll1.java:77: non-static variable EmployeeID cannot be referenced from a static context
EmployeeID = Double.nextDouble();
^
Payroll1.java:77: cannot find symbol
symbol : method nextDouble()
location: class java.lang.Double
EmployeeID = Double.nextDouble();
^
Payroll1.java:80: non-static variable HourlyRate cannot be referenced from a static context
HourlyRate = Double.nextDouble();
^
Payroll1.java:80: cannot find symbol
symbol : method nextDouble()
location: class java.lang.Double
HourlyRate = Double.nextDouble();
^
Payroll1.java:83: non-static variable HoursWorked cannot be referenced from a static context
HoursWorked = Double.nextDouble();
^
Payroll1.java:83: cannot find symbol
symbol : method nextDouble()
location: class java.lang.Double
HoursWorked = Double.nextDouble();
^
Payroll1.java:85: non-static variable EmployeeName cannot be referenced from a static context
System.out.println("The employee name's is: " + EmployeeName);
^
Payroll1.java:86: non-static variable EmployeeID cannot be referenced from a static context
System.out.println("The employee ID is: " + EmployeeID);
^
Payroll1.java:87: non-static variable GrossPay cannot be referenced from a static context
System.out.println("The employee's gross pay is: " + GrossPay);