Hello, I am wondering if someone can help me with a problem I have.
I am using the hasNext() method to read from a file. I have multiple parts in the text file.
Shop A
NoOfStaff
HoursWorked GrossPay
Shop B
NoOfStaff
HoursWorked GrossPay
Then it goes onto Shop C, D, E, etc.
All the units have different amounts of staff, different hours and a diifferent wage.
I have got it to read the file, the number of staff, number of hours, and pay rate, but I want it to stop reading at the empty line, or the next TEXT line... so I can manipulate data for the next Shop Unit. The main question is do I use a break statement after the first loop as I want it to repeat for each Shop Unit.
Thanks for reading.
- @iCurtisIT