package com.my; /** * 链式栈 * @author wanjn * */ public class LinkedStack { private Node head; private int size; //入栈,前插入构造链表,删除头结点实现栈:向后插入构造链表,删除头结点实现队列 public void push(Object value){ if (head ==null) { head = new Node(null, value); }else { head = ne…