Maybe, but why are you setting the rate of a single instance of Employee multiple times? Don't you want multiple Employees, each with a different rate?
Type: Posts; User: KevinWorkman
Maybe, but why are you setting the rate of a single instance of Employee multiple times? Don't you want multiple Employees, each with a different rate?
That's a while loop- there is no such thing as an "if loop". But that while loop is while(true), which will never exit. Your System.exit() call is after that while loop, and since that while loop...
When do you expect that while loop to exit?