Thread: Stacks
View Single Post
  #10 (permalink)  
Old 05-05-2008, 04:51 AM
sukatoa's Avatar
sukatoa sukatoa is offline
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 509
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Quote:
A stack should only let the user be able to see the first item int the stack.
That's an ideal and that theory was maintain in Assembly.

Quote:
but Java lets you search through the stack and see whats in the middle of it.
I think Sun MicroSystems added that feature ( can now access anywhere) for the programmer(implementor) to test if the exact value inserted on that stack are correct or if it is in correct order and able to predict what's the next value to be poped-up ( or the last value to be poped-up) and that is now the advantage.

And it is for debugging purposes only, other purpose makes the stack abused.
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote