/Stack

A simple and functional LIFO (last in first out) Stack data structure from scratch.

Primary LanguageJava

Stack

This project is a simple implementation of a Stack data structure in Java. The Stack is a linear data structure which follows the Last-In-First-Out (LIFO) principle. The last element added is the first one to be removed.
It consists of one class called Stack, it has method to add (push()), delete (pop()), check if it's empty (check()), and show the stack (show()). You can check it's functionality down below.

Screenshots

We show the stack:

Then we use the pop() method twice:

Finally we use push() twice to add values on the top.