@@ -0,0 +1,651 @@
+import java.util.ArrayList;%0Aimport java.util.Stack;%0Aclass ListNode%7B%0A    int val;%0A    ListNode next = null'%0A    ListNode(int val)%7B%0A        this.val = val;%0A    %7D%0A%7D%0A%0Apublic class PrintListReversingly%7B%0A    public ArrayList%3CInteger%3E printListFromTailToHead(ListNode listNode) %7B%0A        ArrayList%3CInteger%3E list = new ArrayList%3C%3E();%0A        if(listNode == null)%0A            return list;%0A        Stack%3CInteger%3E stack = new Stack%3C%3E();%0A        while(list.node!=null)%7B%0A            stack.push(listNode.val);%0A            listNode = listNode.next;%0A        %7D%0A        while(!stack.isEmpty())%7B%0A            list.add(stack.pop());%0A        %7D%0A        return list;%0A    %7D%0A%7D%0A

Create PrintListReversingly.java