Answers to Self-Review Exercises

17.1
  1. referential.

  2. stack.

  3. predicate.

  4. first-in, first-out (FIFO).

  5. link.

  6. garbage collection.

  7. queue.

  8. tree

  9. last-in, first-out (LIFO).

  10. binary.

  11. root.

  12. child or subtree.

  13. leaf.

  14. inorder, preorder, postorder.

  15. auto-unboxing.

  16. autoboxing.

17.2It is possible to insert a node anywhere in a linked list and remove a node from anywhere in a linked list. Nodes in a stack may be inserted only at the top of the stack and removed only from the top.
17.3A queue is a FIFO data structure that has references to both its head and its tail, so that nodes may be inserted at the tail and deleted from the head. A stack is a LIFO data structure that has a single reference to the stack’s top, where both insertion and deletion of nodes are performed.
17.4
  1. Classes ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.