关于创建自己的包的问题
问题如下图所示:该类首代代码是:package com.prefect.ecommerce;
路径是:C:\Program Files\Java\jdk1.6.0_02\lib\com\prefect\ecommerce
classpath是:.;C:\Program Files\Java\jdk1.6.0_02\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_02\lib
程序代码:
package com.prefect.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); } }没有人能解决吗?
[ 本帖最后由 洛云 于 2010-12-20 17:46 编辑 ]