Adding the code to denote the basic Stack Operations in Java