Never used Java in my life, but here it goes ...
Rate = input.nextDouble();
In response to this line, you can enter β15.00β and then press {enter}, which will place the βnew lineβ in the input stream, creating the input stream 15.00\n . When retrieving Double, it will leave a βnew lineβ in the input stream.
When trying to request a user for a different employee name, he reads that there is still a βnew lineβ in the input stream, and he immediately returns what was before, this is an empty line.
To clear the input stream, run the dummy .nextLine.
source share