Hello everybody!
I am new to the site and to java. I am in week 2 of my java class now and still not sure if I am enjoying it. Unfortunately I would say it is my weakest link in the IT field so I picked this class on my own. So far the minor problems have proven to be frustrating.
So I think I have the majority of this program correct and can not figure out why I keep getting error "cannot find symbol variable PayrollProgram1" in line 18. I have fixed the other errors that I was having so far but do not see where this error is coming into play. I have it spelled the same throughout my code and do not understand what else could be wrong with it. I am curious at to everybody's input and thank you in advance for it!
import java.util.Scanner; // load scanner
public class PayrollProgram1 // set public class
{
public static void main( String[] args ) // main method begins
{
Scanner input = new Scanner( System.in ); // create scanner to get input
int hoursWorked; // hours worked
int hourlyPay; // hourly pay
int weeklyPay; // weekly pay
System.out.print( "Enter Employee's Name." ); // enter employee's name
String empName = input.nextLine().
PayrollProgram1.setEmpName ( empName );
System.out.print( "Enter hours worked." ); // enter hours worked
hoursWorked = input.nextInt();
weeklyPay = hoursWorked * hourlyPay; // multiply hourlyPay by hoursWorked for weeklyPay
System.out.printf( "Employee Name: %s, Weekly Pay is $%d%n", empName, weeklyPay ); // print final line
}
}