package query
public class LinkQuery
{
private Node front
private Node vear
public LinkQuery()
{
this.front=null
this.vear=null
}
public void add(int i)
{
Node newNode=new Node(i)
if(vear==null && front==null)
{
vear=newNode
front=newNode
return
}
vear.next=newNode
vear=newNode
}
public int remove()
{
if(this.front==null)
{
System.out.println("隊(duì)是空的,無(wú)法取")
return -1
}
int temp=this.front.data
this.front=this.front.next
if(this.front==null)
{
this.vear=null
}
標(biāo)簽:
private
public
Node
LinkQuery
上傳時(shí)間:
2016-07-08
上傳用戶(hù):天誠(chéng)24