You need to define what you want to happen and where it should happen?
If you want to have the method return a String, do that.
If you want to print out the ticket in the class, do that.
You could...
Type: Posts; User: Norm
You need to define what you want to happen and where it should happen?
If you want to have the method return a String, do that.
If you want to print out the ticket in the class, do that.
You could...
You could override the toString() method or create your own new method like: printTheTicket().
You would need to use the values that are in the ParkingTicket class.
I think I see what you are asking. After creating an instance of the ParkingTicket class, you want to call a method in the class to print out the details.
Can you add a method to the class and move...
Are you sure you want the class to generate an instance of itself?
Can you explain what you want to do? Your question seems to say you want to remove the println statements.
And replace them...