• Post Reply Bookmark Topic Watch Topic
  • New Topic

retail item  RSS feed

 
sam sparks
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why does it keep giving me the error saying that RetailItem[] inventory not found(from the parameter) if its stated above?

 
Miles Williams
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be a silly question but have you instantiated the 3 RetailItem objects jacket, jeans and shirt? I only ask because I don't see it in the code.

**edit**

Nevermind. I ran the code without making the objects and it give a different error. But it does run if you have the objects created. As I thought it would. What is in your processSales() method? Are you sure that isn't where the problem is?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Sam.

To really pinpoint the problem, we need to see your complete source code and the exact error message. What you've posted above is not a complete program. Without the exact details it's hard to know what exactly is the error in your program.
 
Campbell Ritchie
Marshal
Posts: 56529
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You didn't have the code tags right; the [/code] follows the text. Don't worry; I have corrected it for you, and you can see how much better it looks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!