else{
loc=seqSearch(insertItem);
if(loc==-1)
list[length ]=insertItem.getCopy();
else
System.err.println("The item to be inserted is allready in the list!!");
}
}
/* (non-Javadoc)
* @see ArrayListClass#remove(DataElement)
*/
public void remove(DataElement removeItem) {
// TODO Auto-generated method stub
int loc;
if(length==0)
System.err.println("Can't delete from a empty list!!");
else{
loc=seqSearch(removeItem);
if(loc!=-1)
removeAt(loc);
else
System.err.println("The item to be deleted is not in the list!!");
}
}
}
就是这么简单!!相信顺序表也可以轻松高顶了.
上一篇: 2005中国联通UniJa开发商大会开幕
下一篇: 如何用ServletJSP动态生成图像验证码
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



