I am trying to add the integer elements of two Linked Lists. How do I add the contents of two elements of a linked list.
For example:
public void main {
........
LinkList newList = new LinkList();
.........
Link link1, link2, linkAns;
......
......
link2 = newList.deleteFirst();
link1 = newList.deleteFirst();
linkAns = link1 + link2; (ERR = operator + cannot be applied to Link, Link)
Any help would b greatly appreciated