public static void main(String[] args) {
        // TODO Auto-generated method stub
        MinStack m = new MinStack();
        m.push(3);
        m.push(2);
        m.push(4);
        m.push(1);
        Iterator<Integer> it = m.stack.iterator();
        while (it.hasNext()) {
            System.out.print(it.next() + " ");
        }

    }