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, 11:08 AMjeanjiangJava 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, 11:44 AMJosAH
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, 12:24 PMJosAH
- 04-25-2011, 02:19 PMJosAH