This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Sorting? Ordered stack? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Sorting? Ordered stack? " Watch "Sorting? Ordered stack? " New topic
Author

Sorting? Ordered stack?

CP Lau
Greenhorn

Joined: Apr 05, 2001
Posts: 3
Looking to sort using an ordered stack and the java.util.Stack class but I'm not certain how to code it with push and pop. Pushing into the first stack then popping it out when new input is added inorder to sort it. The pop would send it to a temp stack or send what has to be sent to the temp stack then push and pop it back into the original stack. I'm really lost and sure my explination is just going to confuse others.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Is this a class assignment? Otherwise why would you re-invent the wheel???


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
jQuery in Action, 2nd edition
 
subject: Sorting? Ordered stack?
 
Similar Threads
Stack class in Java ?
info on stack structure
nullpointerexception
Ordered Stack.. Plz Help
itemAt Stacks