Java Reference
In-Depth Information
GenQueue
is a generic class with type parameter
T
, which specifies the type of data
stored in the queue. Notice that
T
is also passed to the
IGenQ
interface.
Notice that the
GenQueue
constructor is passed a reference to an array that will be
used to hold the queue. Thus, to construct a
GenQueue
, you will first create an array
whose type is compatible with the objects that you will be storing in the queue and