Example of a Pyramid Stack in Java