Code example for Stack

Methods: pop, size

0
        stack.push(item);
        return item;
    } 
 
    public Integer pop(){
        if(stack.size()==0){
            return null; 
        } 
        minStack.pop();
        return stack.pop();
    } 
 
    public Integer getMinimum(){
        if(minStack.empty()){
            return null; 
        } 
        return minStack.peek();
    } 
 
    public int size(){ 
        return stack.size();