Stack Program (console) in Java

This is a fully working dynamic stack program example. The stack size is increased on overflow and decreased accordingly when empty space is more than 66% on pushing some element.
There is an interface to control the operations on stack. To make dynamic stack, the array is referenced to a new array with deferent size that is temporary. Other help comment are also present right in the code.

If you like this work, drop a comment.
Download

Another version in which stack index variable starts from -1 is here .

Advertisements
Stack Program (console) in Java

3 thoughts on “Stack Program (console) in Java

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s