Data Structure Lab 4
Data Structure Lab 4
public Node() {
this.data = 0;
this.next = null;
}
public Node(int d) {
this.data = d;
this.next = null;
}
}
---------------------------------------
public class LinkedList {
public LinkedList() {
this.first = null;
}
if (carry > 0) {
result.insertAtBack(carry);
}
return result;
}
System.out.println("List 1:");
list1.display();
System.out.println("List 2:");
list2.display();
--------------------
EX2:
------------------------------------
----------------------------------
public class TaskList {
public TaskList() {
head = null;
}
if (head.getTask().getTitle().equals(title)) {
head = head.getNext();
return;
}
--------------------------
System.out.println("All Tasks:");
taskList.listTasks();