Question: QUESTION 1 5 points Save Answer In the following code fragment the else body has a local variable , tempNode, how do you design that

QUESTION 1 5 points Save Answer In the following code fragment the else body has a local variable , tempNode, how do you design that clause not to use tempNOde? (point 5) public void addFirst(E e) { if (size == 0) {tail = new Nodele, null); tail.setNext(tail) } else { Node tempNode = new Node(e, tail.getNext()); tail.setNext(TempNode); } size++; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
