I am doing my homework and I have to create a payroll program that will loop until the user enters "stop" as the the employee's name. I also have to make the program say that only positive numbers are accepted in the event of the user entering a negative number.
I got the program to run and loop with the while loop, but I am having problems with the part the will not allow negative numbers.
I am not sure if I am suppose to use a for or an if then
Can someone please help???
I put in
if (stringHoursWorked.equals ("<0"))
System.out.printIn("positive numbers only");
and I am getting an error message that reads:
cannot find symbol
symbol : method printIn(java.lang.String)
location : class java.io.PrintStream
System.out.printIn("positive numbers only");
1 error