找不到符号Item2

时间:2019-05-24 02:51:08

标签: java

这是我的代码:

package org.cadenhead.ecommerce;

import java.util.*;

public class Storefront2 {
    private LinkedList catalog = new LinkedList();

    public void addItem(String id, String name, String price,
        String quant, String discount) {

         Item2 it = new Item2(id, name, price, quant, discount);
        catalog.add(it);
    }

    public Item2 getItem(int i) {
        return (Item2)catalog.get(i);
    }

    public int getSize() {
        return catalog.size();
    }

    public void sort() {
        Collections.sort(catalog);
    }
}

我遇到错误“找不到符号”-Item2

0 个答案:

没有答案