What is "reached end of file while parsing?

I am having problems with the end of my Java program and no matter what I do, it says that I have an error by reaching the end of file while parsing. What is parsing and how do I fix it?

Here is the last of my psuedocode...

if (name.equalsIgnoreCase("stop"))

// compare values in the string to the literal string "stop"

System.out.printf("\nProgram termination requested.\n");

else {

do { // repeat steps until user enters a rate above 0...

System.out.printf("Please enter %s's hourly rate of pay: $", name);

rate = input.nextDouble();

if (rate <= 0)

System.out.printf("\n *** Hourly rate of pay can only be entered in POSITIVE numbers! Try again!\n");

} while (rate <= 0);

do { // repeat steps until user enters more than 0 hrs...

System.out.printf("Please enter %s's amount of hours worked: ", name);

hours = input.nextInt();

if (hours <= 0)

System.out.printf("\n *** Hours worked can only be entered in POSITIVE numbers! Try again!\n");

} while (hours <=0);

}

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 VQUIX.COM - All rights reserved.