MCQOPTIONS
Saved Bookmarks
| 1. |
What is the functionality of the following piece of code? public int function() { Node temp = tail.getPrev(); tail.setPrev(temp.getPrev()); temp.getPrev().setNext(tail); size--; return temp.getItem(); } |
| A. | Return the element at the tail of the list but do not remove it |
| B. | Return the element at the tail of the list and remove it from the list |
| C. | Return the last but one element from the list but do not remove it |
| D. | Return the last but one element at the tail of the list and remove it from the list |
| Answer» C. Return the last but one element from the list but do not remove it | |