Java Reference
In-Depth Information
These classes encapsulate the two queue errors: full or empty. They are not generic
classes because they are the same no matter what type of data is stored in a queue.
Thus, these two files will be the same as those you used with
Try This 9-1
.
3.
Now, create a file called
GenQueue.java
. Into that file, put the following code, which
implements a fixed-size queue: