This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It would be too easy for us to actually give you the right code in the first place, but thats not the approach of this forum. We try to point you to the right direction so that you can figure it out yourself...more so when you are a beginner in Java.
I would suggest you to experiment with the tips given here...
ArrayList or List is the right approach here as Jeanne Boyarsky suggested in the earlier post.
Now that you know how to change the method signature...figure out what changes you need to make to return that type...either a java.util.List of the String...
Joined: Apr 22, 2008
Thanks, it works now...
But I have one more question
This is my question:
In a real application, above prices would be retrieved
from a database, of course. How can I do this? private final float CAR1_PRICE = 1.45F;
private final float CAR2_PRICE = 1.75F;
I can get only price for last or first car in my DB.
Qt is OK.
Total cost is OK.