@@ -0,0 +1,1166 @@
+package org.think.ex;%0A%0Apublic class ExTemplateStack%3CT%3E %7B%0A    private static class Node%3CU%3E %7B%0A        U item;%0A        Node%3CU%3E next;%0A%0A        Node() %7B%0A            item = null;%0A            next = null;%0A        %7D%0A%0A        Node (U item, Node%3CU%3E next) %7B%0A            this.item = item;%0A            this.next = next;%0A        %7D%0A%0A        boolean end() %7B%0A            return this.item == null && this.next == null;%0A        %7D%0A    %7D%0A%0A    private Node%3CT%3E top = new Node%3CT%3E();%0A%0A    public void push(T item) %7B%0A        top = new Node%3CT%3E(item, top);%0A    %7D%0A%0A    public T pop() %7B%0A        T result = top.item;%0A        if (!top.end()) %7B%0A            top = top.next;%0A        %7D%0A        return result;%0A    %7D%0A%0A    public boolean end() %7B%0A        if (top == null) %7B%0A            return true;%0A        %7D%0A        else %7B%0A            return top.end();%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        ExTemplateStack%3CString%3E oStack = new ExTemplateStack%3CString%3E();%0A        for (String s : %22Phaser of Satunm!%22.split(%22 %22)) %7B%0A            oStack.push(s);%0A        %7D%0A        while (!oStack.end()) %7B%0A            String s = oStack.pop();%0A            System.out.println(s);%0A        %7D%0A    %7D%0A%7D%0A

add new example file