Hello there. I tidied up a few things for you; here's the revised code.
CODE
//PayrollProgramPart2
import java.util.Scanner; // class Scanner
public class PayrollProgramPart2
{
//main method begins execution of Java application
public static void main(String args[])
{
//create Scanner to obtain input from command window
Scanner input = new Scanner(System.in);
String cleanInputBuffer; //input
String employeeName; // input
double hourlyRate; // input
double hoursWorked; // input
double sum; // weekly pay
boolean end = false; // is the input name stop?
while (end == false) // as long as end is false, proceed
{
hourlyRate = -1; // this way, both are initiated to be -1;
hoursWorked = -1;
System.out.print("Enter Name of Employee:");
employeeName = input.nextLine();
if(employeeName.toLowerCase() == "stop")
end = true; // when the stop is detected, change the boolean, which will end the while loop while(hourlyRate<0) // since this was initiated to -1, it will loop until it gets a positive value
System.out.print("Enter a positive hourly rate:"); // prompt
hourlyRate = input.nextDouble(); // input
while (hoursWorked < 0) // same as hourlyRate while loop
{
System.out.print("Enter a positive number of hours worked:"); // prompt
hoursWorked = input.nextDouble(); // input
}
sum = hourlyRate * hoursWorked; // * numbers
System.out.printf("The employee %s was paid $ %.2f this week", employeeName, sum);
//Clean the input buffer
cleanInputBuffer = input.nextLine(); //Read a line of text to clean the input buffer
} // end outer while
} // end method main
} // end class PayrollProgramPart
Basically, you were missing one brace and the second while loop was going over its limits pretty much. I also fixed a small typo on the second loop "while (hourseWorked > 0)", so that should take care of that problem before it happens.
I also had to declare
cleanInputBuffer at the top as it was complaining about a "missing symbol" A.K.A. no variable declaration, so I fixed that up too.
Hope that helps.