Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need help on stack method

807580May 12 2010 — edited May 14 2010
Hi

I need to write a stack method which has an int index argument depending on which the specific element from the stack will be popped , but the catch is i can't use any other stack method other than push/pop/peek/empty, neither can I make any other object (not even any collection obj or string or array or any kind) or write any new method. Also , at the end of the method the original stack passed as the method argument should be kept unchanged (even if any exception happens).

Any pointer on this would be appreciated.

Indro

Edited by: ainindra on May 11, 2010 10:04 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2010
Added on May 12 2010
16 comments
296 views