Java TOPIC 22 – QUEUES & STACKS LESSON WORK QUESTION 1 Add
five names in the queue. Output
the queue to screen. Remove
a name from the queue. Output
the queue to screen. (Notice that the
first name entered is the one removed.) QUESTION 2
Add
numbers to the stack. Output
the stack to screen. Pop
a number off the stack. (Pop means
remove.) Output
the stack to screen. (Notice that the
last number entered is the one removed.) |
|