Fanook
public text v1 · immutable public void addElement(int data) { // add a new integer at head of list
head = new ListCell(data, head);
if(tail==null){
tail=head;
}
else if(tail.next!=null){
tail = tail.next;
}
} public void addElement(int data) { // add a new integer at head of list
head = new ListCell(data, head);
if(tail==null){
tail=head;
}
else if(tail.next!=null){
tail = tail.next;
}
}