Get your CodeRanch badge!*
The moose likes Beginning Java and the fly likes Ordered Stack.. Plz Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Ordered Stack.. Plz Help" Watch "Ordered Stack.. Plz Help" New topic

Ordered Stack.. Plz Help

CP Lau

Joined: Apr 05, 2001
Posts: 3
How do you implement an ordered stack using the java.util.Stcak class? What would the new definitions be for the methods of push and pop? I'm really lost...
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
What are you REALLY trying to accomplish. Is there some driving reason that yoy think Stack is the solution???
It SOUNDS like you are wanting a sorted something, perhaps a SortedSet??

"JavaRanch, where the deer and the Certified play" - David O'Meara
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Ordered Stack.. Plz Help
Similar Threads
Factorial recursion doubt.getting confused how same method is being called
Sorting? Ordered stack?
PriorityQueue Ordering - different result when using foreach versus while loop
WA #1.....word association
basic question about <s:iterator>