MCPcopy Create free account
hub / github.com/apna-college/Alpha / addLast

Method addLast

12_LinkedList.java/LL.java:25–34  ·  view source on GitHub ↗
(int data)

Source from the content-addressed store, hash-verified

23 }
24
25 public void addLast(int data) {
26 size++;
27 Node newNode = new Node(data);
28 if(head == null) {
29 head = tail = newNode;
30 } else {
31 tail.next = newNode;
32 tail = newNode;
33 }
34 }
35
36 public void print() {
37 Node temp = head;

Callers 3

mainMethod · 0.95
pushMethod · 0.45
addMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected