??????????????????????С?
package cn.zhf.list;
//???е?Link??LinkList???????е????
public class LinkQueue {
private LinkList list;
public LinkQueue(){
list = new LinkList();
}
public boolean isEmpty(){
return list.isEmpty();
}
public void insert(int id??double dd){
list.insertFirst(id?? dd);
}
public Link delete(){
return list.deleteFirst();
}
public void display(){
list.displayLink();
}
public static void main(String[] args) {
LinkQueue lq = new LinkQueue();
lq.insert(12?? 20.0);
lq.insert(13?? 20.1);
lq.insert(14?? 20.2);
lq.display();
System.out.println("-----------");
lq.delete();
lq.display();
}
}
???????н????
14??20.2
13??20.1
12??20.0
-----------
13??20.1
12??20.0