Glad you got it working.
Type: Posts; User: Norm
Glad you got it working.
You still are printing a line with null. Where is that coming from? Which println statement is printing it?
Look for a println with only one item in the (). Add an ID String there for testing:...
Forget about testing it, just print it and you can see what it is:
System.out.println("parkedCar=" + parkingMeter.getParkedCar());
What is the name of the variables you are talking about?
You need to see exactly what variable has the null value and then backtrack in the code to see where the null value came from.
Yes, programming has lots of details and they must all be handled...
That info is in the current instance of the class. Use the this reference variable when you need to refer to the current instance of the class.
Where are these lines printed:
Parking Ticket 0001...
Where is the line with null being printed? Why is it null and not the information about the car?
Why do you create a new instance of PoliceOfficer in the PoliceOfficer class's checkMeter() method?...