public void insert(int... data) {
LinkedList L = this;
while(L.next!=null) {
L=L.next;
}
int size=data.length;
for(int i=0; i<size; i++) {
L.next=new LinkedList(data[i]);
L=L.next;
}
}
No comments:
Post a Comment