@@ -0,0 +1,911 @@
+/**%0A * Company%0A * Copyright (C) 2014-2017 All Rights Reserved.%0A */%0Apackage com.cwenao.trying.stack;%0A%0A/**%0A * @author cwenao%0A * @version $Id Stack.java, v 0.1 2017-09-20 13:03 cwenao Exp $$%0A */%0Apublic class Stack %7B%0A    private static final int MAX = 1000;%0A    int top;%0A    int%5B%5D stack = new int%5BMAX%5D;%0A%0A    public boolean isEmpty() %7B%0A        return top %3C 0;%0A    %7D%0A%0A    public Stack() %7B%0A        top = -1;%0A    %7D%0A%0A    public boolean push(int x) %7B%0A        if (top%3E=MAX) %7B%0A            return false;%0A        %7D%0A        stack%5B++top%5D = x;%0A        return true;%0A    %7D%0A%0A    public int pop() %7B%0A        if (top %3C 0) %7B%0A            return 0;%0A        %7D%0A        int x = stack%5Btop--%5D;%0A        return x;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Stack stack = new Stack();%0A        stack.push(1);%0A        stack.push(2);%0A        stack.push(3);%0A        stack.push(4);%0A%0A        System.out.println(stack.pop());%0A    %7D%0A%0A%7D%0A

add the simple stack