I would like to understand this once and for all.
With this please excuse the mass of code pasted below, but I do not want to leave out any details.
The only
Real solution? Don't put so much stuff in the main() method. That's for noobs.
Java's an object-oriented language. Put the logic inside methods associated with the GarageComm class. main() should do little more than instantiate an instance and call its methods.
Change it like this:
GarageComm gc = new GarageComm();
hashPos= gc.readPositions("holdingsBU.txt");//the error is here