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

Java Examples

Problem 1.

input integer and output sum of digits in the integer.
Download
Problem 2.

Pyramid of ABCDE 🙂
Download

Problem 3.

Occurrence of string in a text from file.
Download

Problem 4.

Reading a text file
Download

Problem 5.

Writing to a text file
Download

Problem 6.

Decimal to Binary convertor
Download

Problem 7.

Frequency of elements in an array.
Download

Java Examples