for example how would I make a for loop to print this list one item at a time?
inventory[0] = new Product("Books", 1, 1000, 6.99);
inventory[1] = new Product("Bookmarks", 2, 600, 2.99);
inventory[2] = new Product("Book Lights", 3, 500, 10.99);
inventory[3] = new Product("Book Plates", 4, 800, 3.99);
inventory[4] = new Product("Book Ends", 5, 200, 5.99);
I tried:
for (new Product() )
System.printf (new Product() )
and lots of other things I could think of - nothing works.
Thank you for your time.
-bigbluesky

New Topic/Question
Reply




MultiQuote






|