Popping element from the top of the stack
static void stack_pop ( Stack < Integer > stack ) { System . out . println ( " Pop ▁ : " ) ; for ( int i = 0 ; i < 5 ; i ++ ) { Integer y = ( Integer ) stack . pop ( ) ; System . out . println ( y ) ; } }