PatrickW
2009-09-07 17:08:12 UTC
Here is my "program:"
"
package org.cadenhead.ecommerce;
import java.util.*;
public class Storefront {
private LinkedList catalog = new LinkedList();
public void addItem(String id, String name, String price, String quant) {
Item it = new Item(id, name, price, quant);
catalog.add(it);
}
public Item getItem(int i) {
return (Item)catalog.get(i);
}
public int getSize() {
return catalog.size();
}
public void sort() {
Collections.sort(catalog);
}
}
"
So when I try to compile it, this is the error message that I get:
"Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Patrick>cd \
C:\>D:
D:\>cd dev/java/org/cadenhead/ecommerce
D:\dev\java\org\cadenhead\ecommerce>javac Storefront.java
Storefront.java:15: cannot find symbol
symbol : class Item
location: class org.cadenhead.ecommerce.Storefront
public Item getItem(int i) {
^
Storefront.java:10: cannot find symbol
symbol : class Item
location: class org.cadenhead.ecommerce.Storefront
Item it = new Item(id, name, price, quant);
^
Storefront.java:10: cannot find symbol
symbol : class Item
location: class org.cadenhead.ecommerce.Storefront
Item it = new Item(id, name, price, quant);
^
Storefront.java:16: cannot find symbol
symbol : class Item
location: class org.cadenhead.ecommerce.Storefront
return (Item)catalog.get(i);
^
Note: Storefront.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors"
Those carrots are under the "I" in "Item" for all those errors. I do not think that it is simply a capitalization error though, is it? I have no clue what that -Xlint thing is at the bottom of the error either.