Hello everyone, I am new to Java programming as well as to these most excellent forums and I have a problem with some sample code from a book that is teaching me Java. The code is supposed to demonstrate packages, access control, interfaces, and encapsulation. My problem is that when I try to compile one of the files I get the following errors:
Storefront.java:14: cannot find symbol
symbol : class Item
location: class org.warren.ecommerce.Storefront
public Item getItem(int i) {
^
Storefront.java:10: cannot find symbol
symbol : class Item
location: class org.warren.ecommerce.Storefront
Item it = new Item(id, name, price, quant);
^
Storefront.java:10: cannot find symbol
symbol : class Item
location: class org.warren.ecommerce.Storefront
Item it = new Item(id, name, price, quant);
^
Storefront.java:15: cannot find symbol
symbol : class Item
location: class org.warren.ecommerce.Storefront
return (Item)catalog.get(i);
^
Note: Storefront.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
The Item class is in a different file in the same folder and part of the same package and is declared public so I'm not sure why the compiler won't recognize it when I try to compile this other file. Any help you guys can offer would be greatly appreciated...oh, and I apologize in advance if this error is covered in a different thread, I couldn't find it if it was.