Well now you see, it still tries to access data which isn't there.
Using while (inputFile.hasNext()), when it reaches the very last token, it will still call your readRecord() method, where it will...
Type: Posts; User: newbie
Well now you see, it still tries to access data which isn't there.
Using while (inputFile.hasNext()), when it reaches the very last token, it will still call your readRecord() method, where it will...
In that case, you've only got 2 lines of data, but attempting to retrieve four lines worth of data.
//fleetVehicles.length is 4!
for (int i = 0; i < fleetVehicles.length; i++)
{...
Code practices aside, I'd be willing to bet that the reason you're getting that error is because of the blank line in-between your data in the file.
Remove all empty lines from the file and then...