From Data Construction, I learned two constructions - Stack and Queue. Stack is FILO and Queue is FIFO. My question is that in Java, if we want to use Stack and Queue, do we need to create two classes to implement there two functions?

Printable View

- 04-25-2011, 12:08 PMjeanjiangJava Stack and Queue
From Data Construction, I learned two constructions - Stack and Queue. Stack is FILO and Queue is FIFO. My question is that in Java, if we want to use Stack and Queue, do we need to create two classes to implement there two functions?

- 04-25-2011, 12:44 PMJosAH
I do hope that you have either downloaded or bookmarked the Java SE API documentation. If you have you'd see that those classes (not 'functions') are implemented for you.

kind regards,

Jos - 04-25-2011, 01:24 PMJosAH
- 04-25-2011, 03:19 PMJosAH