diff --git a/group03/345943980/download-0335/pom.xml b/group03/345943980/download-0335/pom.xml
index b62ba3fec1..5193da926b 100644
--- a/group03/345943980/download-0335/pom.xml
+++ b/group03/345943980/download-0335/pom.xml
@@ -28,8 +28,8 @@
org.apache.maven.plugins
maven-compiler-plugin
- 1.7
- 1.7
+ 1.8
+ 1.8
diff --git a/group03/345943980/mini-jvm-0330/src/main/java/com/coderising/jvm/loader/ClassFileLoader.java b/group03/345943980/mini-jvm-0330/src/main/java/com/coderising/jvm/loader/ClassFileLoader.java
new file mode 100644
index 0000000000..17abd10b7e
--- /dev/null
+++ b/group03/345943980/mini-jvm-0330/src/main/java/com/coderising/jvm/loader/ClassFileLoader.java
@@ -0,0 +1,68 @@
+package com.coderising.jvm.loader;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+
+public class ClassFileLoader {
+
+ private List clzPaths = new ArrayList();
+
+ public byte[] readBinaryCode(String className) {
+ className = className.replace(".", File.separator) + ".class";
+ for (String path : clzPaths) {
+ String clzFileName = path + File.separator + className;
+ byte[] codes = this.loadClassFile(clzFileName);
+ if (codes != null) {
+ return codes;
+ }
+ }
+ return null;
+ }
+
+ private byte[] loadClassFile(String clzFileName){
+ try {
+ return IOUtils.toByteArray(new FileInputStream(clzFileName));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public void addClassPath(String path) {
+ clzPaths.add(path);
+ }
+
+ public String getClassPath() {
+ return StringUtils.join(clzPaths, ";");
+ }
+
+ public String getClassPath_V1() {
+ StringBuffer sb = new StringBuffer();
+ /*
+ * for (int i = 0; i < clzPaths.size(); i++)
+ {
+ if (i == clzPaths.size() - 1) {
+ sb.append(clzPaths.get(i));
+ break;
+ }
+ sb.append(clzPaths.get(i));
+ sb.append(";");
+ *
+ * }
+ */
+ for (int i = 0; i < clzPaths.size(); i++) {
+ sb.append(clzPaths.get(i));
+ if (i < clzPaths.size() - 1) {
+ sb.append(";");
+ }
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/group03/345943980/mini-jvm-0330/src/main/java/com/coding/basic/linklist/CmLRUPageFrame.java b/group03/345943980/mini-jvm-0330/src/main/java/com/coding/basic/linklist/CmLRUPageFrame.java
new file mode 100644
index 0000000000..890db81fb5
--- /dev/null
+++ b/group03/345943980/mini-jvm-0330/src/main/java/com/coding/basic/linklist/CmLRUPageFrame.java
@@ -0,0 +1,69 @@
+package com.coding.basic.linklist;
+
+/**
+ *
+ * @author chenming E-mail:cm_20094020@163.com
+ * @version 创建时间:2017年4月10日 上午12:35:03
+ */
+public class CmLRUPageFrame {
+
+ private static class Node {
+ Node prev;
+ Node next;
+ int pageNum;
+
+ Node() {
+ }
+ }
+
+ private int capacity;
+
+ private Node first;// 链表头
+ private Node last;// 链表尾
+
+ public CmLRUPageFrame(int capacity) {
+ this.capacity = capacity;
+
+ }
+
+ /**
+ * 获取缓存中对象
+ *
+ * @param pageNum
+ */
+ public void access(int pageNum) {
+ Node node = first;
+ Node foundNode = null;
+ while(node!=null){
+ if(node.pageNum==pageNum){
+ foundNode = node;
+ }
+ node = node.next;
+ }
+
+ //在该队列中存在, 则提到队列头
+ if(foundNode!=null){
+
+ }else{
+
+ }
+
+
+
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder buffer = new StringBuilder();
+ Node node = first;
+ while (node != null) {
+ buffer.append(node.pageNum);
+ node = node.next;
+ if (node != null) {
+ buffer.append(";");
+ }
+ }
+ return buffer.toString();
+ }
+
+}
diff --git a/group03/345943980/mini-jvm-0330/src/main/java/com/coding/basic/linklist/LRUPageFrame.java b/group03/345943980/mini-jvm-0330/src/main/java/com/coding/basic/linklist/LRUPageFrame.java
new file mode 100644
index 0000000000..3dba1b554b
--- /dev/null
+++ b/group03/345943980/mini-jvm-0330/src/main/java/com/coding/basic/linklist/LRUPageFrame.java
@@ -0,0 +1,163 @@
+package com.coding.basic.linklist;
+
+
+/**
+ * 实现一个简单的LRU算法,即是 Least Recently Used 近期最少使用算法
+ * 作用:需要维护一个页面中的栈,并且需要把某一个页面从栈中提到栈顶,用硬件实现的话,开销比较大,注意:实际上并不是一个真正的栈
+ * @author Administrator
+ *
+ */
+public class LRUPageFrame {
+
+ private static class Node {
+
+ Node prev;
+ Node next;
+ int pageNum;
+
+ Node() {
+ }
+ }
+
+ private int capacity;
+
+ private int currentSize;
+ private Node first;// 链表头
+ private Node last;// 链表尾
+
+
+ public LRUPageFrame(int capacity) {
+ this.currentSize = 0;
+ this.capacity = capacity;
+
+ }
+
+ /**
+ * 获取缓存中对象
+ *
+ * @param key
+ * @return
+ */
+ public void access(int pageNum) {
+
+ Node node = find(pageNum);
+ //在该队列中存在, 则提到队列头
+ if (node != null) {
+
+ moveExistingNodeToHead(node);
+
+ } else{
+
+ node = new Node();
+ node.pageNum = pageNum;
+
+ // 缓存容器是否已经超过大小.
+ if (currentSize >= capacity) {
+ removeLast();
+
+ }
+
+ addNewNodetoHead(node);
+
+
+
+
+ }
+ }
+
+ private void addNewNodetoHead(Node node) {
+
+ if(isEmpty()){
+
+ node.prev = null;
+ node.next = null;
+ first = node;
+ last = node;
+
+ } else{
+ node.prev = null;
+ node.next = first;
+ first.prev = node;
+ first = node;
+ }
+ this.currentSize ++;
+ }
+
+ private Node find(int data){
+
+ Node node = first;
+ while(node != null){
+ if(node.pageNum == data){
+ return node;
+ }
+ node = node.next;
+ }
+ return null;
+
+ }
+
+
+ /**
+ * 删除链表尾部节点 表示 删除最少使用的缓存对象
+ */
+ private void removeLast() {
+ Node prev = last.prev;
+ prev.next = null;
+ last.prev = null;
+ last = prev;
+ this.currentSize --;
+ }
+
+ /**
+ * 移动到链表头,表示这个节点是最新使用过的
+ *
+ * @param node
+ */
+ private void moveExistingNodeToHead(Node node) {
+
+ if (node == first) {
+
+ return;
+ }
+ else if(node == last){
+ //当前节点是链表尾, 需要放到链表头
+ Node prevNode = node.prev;
+ prevNode.next = null;
+ last.prev = null;
+ last = prevNode;
+
+ } else{
+ //node 在链表的中间, 把node 的前后节点连接起来
+ Node prevNode = node.prev;
+ prevNode.next = node.next;
+
+ Node nextNode = node.next;
+ nextNode.prev = prevNode;
+
+
+ }
+
+ node.prev = null;
+ node.next = first;
+ first.prev = node;
+ first = node;
+
+ }
+ private boolean isEmpty(){
+ return (first == null) && (last == null);
+ }
+
+ public String toString(){
+ StringBuilder buffer = new StringBuilder();
+ Node node = first;
+ while(node != null){
+ buffer.append(node.pageNum);
+
+ node = node.next;
+ if(node != null){
+ buffer.append(",");
+ }
+ }
+ return buffer.toString();
+ }
+}
diff --git a/group03/345943980/mini-jvm-0330/src/test/java/com/coderising/jvm/test/ClassFileloaderTest.java b/group03/345943980/mini-jvm-0330/src/test/java/com/coderising/jvm/test/ClassFileloaderTest.java
new file mode 100644
index 0000000000..cf4108c0d9
--- /dev/null
+++ b/group03/345943980/mini-jvm-0330/src/test/java/com/coderising/jvm/test/ClassFileloaderTest.java
@@ -0,0 +1,87 @@
+package com.coderising.jvm.test;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.coderising.jvm.loader.ClassFileLoader;
+
+
+public class ClassFileloaderTest {
+
+
+ static String path1 = "E:\\github\\coding2017\\group03\\345943980\\mini-jvm-0330\\target\\test-classes";
+ static String path2 = "D:\\wordtest";
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testClassPath(){
+
+ ClassFileLoader loader = new ClassFileLoader();
+ loader.addClassPath(path1);
+ loader.addClassPath(path2);
+
+ String clzPath = loader.getClassPath();
+
+ Assert.assertEquals(path1+";"+path2,clzPath);
+
+ }
+
+ @Test
+ public void testClassFileLength() {
+
+ ClassFileLoader loader = new ClassFileLoader();
+ loader.addClassPath(path1);
+
+ String className = "com.coderising.jvm.test.EmployeeV1";
+
+ byte[] byteCodes = loader.readBinaryCode(className);
+
+ // 注意:这个字节数可能和你的JVM版本有关系, 你可以看看编译好的类到底有多大
+ Assert.assertEquals(1056, byteCodes.length);
+
+ }
+
+ @Test
+ public void testMagicNumber(){
+ ClassFileLoader loader = new ClassFileLoader();
+ loader.addClassPath(path1);
+ String className = "com.coderising.jvm.test.EmployeeV1";
+ byte[] byteCodes = loader.readBinaryCode(className);
+ byte[] codes = new byte[]{byteCodes[0],byteCodes[1],byteCodes[2],byteCodes[3]};
+
+
+ String acctualValue = this.byteToHexString(codes);
+
+ Assert.assertEquals("cafebabe", acctualValue);
+ }
+
+ private String byteToHexString(byte[] codes ){
+ StringBuffer buffer = new StringBuffer();
+ for(int i=0;i constantInfos = new ArrayList();
+
+
+ public ConstantPool(){
+
+ }
+ public void addConstantInfo(ConstantInfo info){
+
+ this.constantInfos.add(info);
+
+ }
+
+ public ConstantInfo getConstantInfo(int index){
+ return this.constantInfos.get(index);
+ }
+ public String getUTF8String(int index){
+ return ((UTF8Info)this.constantInfos.get(index)).getValue();
+ }
+ public Object getSize() {
+ return this.constantInfos.size() -1;
+ }
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/FieldRefInfo.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/FieldRefInfo.java
new file mode 100644
index 0000000000..7ff9d5fb77
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/FieldRefInfo.java
@@ -0,0 +1,54 @@
+package com.coderising.jvm.constant;
+
+public class FieldRefInfo extends ConstantInfo{
+ private int type = ConstantInfo.FIELD_INFO;
+ private int classInfoIndex;
+ private int nameAndTypeIndex;
+
+ public FieldRefInfo(ConstantPool pool) {
+ super(pool);
+ }
+ public int getType() {
+ return type;
+ }
+
+ public int getClassInfoIndex() {
+ return classInfoIndex;
+ }
+ public void setClassInfoIndex(int classInfoIndex) {
+ this.classInfoIndex = classInfoIndex;
+ }
+ public int getNameAndTypeIndex() {
+ return nameAndTypeIndex;
+ }
+ public void setNameAndTypeIndex(int nameAndTypeIndex) {
+ this.nameAndTypeIndex = nameAndTypeIndex;
+ }
+
+ public String toString(){
+
+ NameAndTypeInfo typeInfo = (NameAndTypeInfo)this.getConstantInfo(this.getNameAndTypeIndex());
+
+ return getClassName() +" : "+ typeInfo.getName() + ":" + typeInfo.getTypeInfo() +"]";
+ }
+
+ public String getClassName(){
+
+ ClassInfo classInfo = (ClassInfo) this.getConstantInfo(this.getClassInfoIndex());
+
+ UTF8Info utf8Info = (UTF8Info)this.getConstantInfo(classInfo.getUtf8Index());
+
+ return utf8Info.getValue();
+
+ }
+
+ public String getFieldName(){
+ NameAndTypeInfo typeInfo = (NameAndTypeInfo)this.getConstantInfo(this.getNameAndTypeIndex());
+ return typeInfo.getName();
+ }
+
+ public String getFieldType(){
+ NameAndTypeInfo typeInfo = (NameAndTypeInfo)this.getConstantInfo(this.getNameAndTypeIndex());
+ return typeInfo.getTypeInfo();
+ }
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/MethodRefInfo.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/MethodRefInfo.java
new file mode 100644
index 0000000000..0feffa65b5
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/MethodRefInfo.java
@@ -0,0 +1,55 @@
+package com.coderising.jvm.constant;
+
+public class MethodRefInfo extends ConstantInfo {
+
+ private int type = ConstantInfo.METHOD_INFO;
+
+ private int classInfoIndex;
+ private int nameAndTypeIndex;
+
+ public MethodRefInfo(ConstantPool pool) {
+ super(pool);
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public int getClassInfoIndex() {
+ return classInfoIndex;
+ }
+ public void setClassInfoIndex(int classInfoIndex) {
+ this.classInfoIndex = classInfoIndex;
+ }
+ public int getNameAndTypeIndex() {
+ return nameAndTypeIndex;
+ }
+ public void setNameAndTypeIndex(int nameAndTypeIndex) {
+ this.nameAndTypeIndex = nameAndTypeIndex;
+ }
+
+ public String toString(){
+
+ return getClassName() +" : "+ this.getMethodName() + " : " + this.getParamAndReturnType() ;
+ }
+ public String getClassName(){
+ ConstantPool pool = this.getConstantPool();
+ ClassInfo clzInfo = (ClassInfo)pool.getConstantInfo(this.getClassInfoIndex());
+ return clzInfo.getClassName();
+ }
+
+ public String getMethodName(){
+ ConstantPool pool = this.getConstantPool();
+ NameAndTypeInfo typeInfo = (NameAndTypeInfo)pool.getConstantInfo(this.getNameAndTypeIndex());
+ return typeInfo.getName();
+ }
+
+ public String getParamAndReturnType(){
+ ConstantPool pool = this.getConstantPool();
+ NameAndTypeInfo typeInfo = (NameAndTypeInfo)pool.getConstantInfo(this.getNameAndTypeIndex());
+ return typeInfo.getTypeInfo();
+ }
+
+
+
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/NameAndTypeInfo.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/NameAndTypeInfo.java
new file mode 100644
index 0000000000..dcac7f97c4
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/NameAndTypeInfo.java
@@ -0,0 +1,45 @@
+package com.coderising.jvm.constant;
+
+public class NameAndTypeInfo extends ConstantInfo{
+ public int type = ConstantInfo.NAME_AND_TYPE_INFO;
+
+ private int index1;
+ private int index2;
+
+ public NameAndTypeInfo(ConstantPool pool) {
+ super(pool);
+ }
+
+ public int getIndex1() {
+ return index1;
+ }
+ public void setIndex1(int index1) {
+ this.index1 = index1;
+ }
+ public int getIndex2() {
+ return index2;
+ }
+ public void setIndex2(int index2) {
+ this.index2 = index2;
+ }
+ public int getType() {
+ return type;
+ }
+
+
+ public String getName(){
+ ConstantPool pool = this.getConstantPool();
+ UTF8Info utf8Info1 = (UTF8Info)pool.getConstantInfo(index1);
+ return utf8Info1.getValue();
+ }
+
+ public String getTypeInfo(){
+ ConstantPool pool = this.getConstantPool();
+ UTF8Info utf8Info2 = (UTF8Info)pool.getConstantInfo(index2);
+ return utf8Info2.getValue();
+ }
+
+ public String toString(){
+ return "(" + getName() + "," + getTypeInfo()+")";
+ }
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/NullConstantInfo.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/NullConstantInfo.java
new file mode 100644
index 0000000000..fa90d110fe
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/NullConstantInfo.java
@@ -0,0 +1,13 @@
+package com.coderising.jvm.constant;
+
+public class NullConstantInfo extends ConstantInfo {
+
+ public NullConstantInfo(){
+
+ }
+ @Override
+ public int getType() {
+ return -1;
+ }
+
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/StringInfo.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/StringInfo.java
new file mode 100644
index 0000000000..d01065fd53
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/StringInfo.java
@@ -0,0 +1,26 @@
+package com.coderising.jvm.constant;
+
+public class StringInfo extends ConstantInfo{
+ private int type = ConstantInfo.STRING_INFO;
+ private int index;
+ public StringInfo(ConstantPool pool) {
+ super(pool);
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+
+ public String toString(){
+ return this.getConstantPool().getUTF8String(index);
+ }
+
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/UTF8Info.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/UTF8Info.java
new file mode 100644
index 0000000000..b7407d146f
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/constant/UTF8Info.java
@@ -0,0 +1,32 @@
+package com.coderising.jvm.constant;
+
+public class UTF8Info extends ConstantInfo{
+ private int type = ConstantInfo.UTF8_INFO;
+ private int length ;
+ private String value;
+ public UTF8Info(ConstantPool pool) {
+ super(pool);
+ }
+ public int getLength() {
+ return length;
+ }
+ public void setLength(int length) {
+ this.length = length;
+ }
+ public int getType() {
+ return type;
+ }
+ @Override
+ public String toString() {
+ return "UTF8Info [type=" + type + ", length=" + length + ", value=" + value +")]";
+ }
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+
+
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/loader/ByteCodeIterator.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/loader/ByteCodeIterator.java
new file mode 100644
index 0000000000..2dff6746da
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/loader/ByteCodeIterator.java
@@ -0,0 +1,5 @@
+package com.coderising.jvm.loader;
+
+public class ByteCodeIterator {
+
+}
diff --git a/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/loader/ClassFileLoader.java b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/loader/ClassFileLoader.java
new file mode 100644
index 0000000000..b9d2a3ba0c
--- /dev/null
+++ b/group03/345943980/mini-jvm-0405/src/main/java/com/coderising/jvm/loader/ClassFileLoader.java
@@ -0,0 +1,131 @@
+package com.coderising.jvm.loader;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import com.coderising.jvm.clz.ClassFile;
+
+public class ClassFileLoader {
+
+ private List clzPaths = new ArrayList();
+
+ public byte[] readBinaryCode(String className) {
+
+ className = className.replace('.', File.separatorChar) +".class";
+
+ for(String path : this.clzPaths){
+
+ String clzFileName = path + File.separatorChar + className;
+ byte[] codes = loadClassFile(clzFileName);
+ if(codes != null){
+ return codes;
+ }
+ }
+ return null;
+ }
+
+ private byte[] loadClassFile(String clzFileName) {
+
+ File f = new File(clzFileName);
+
+ try {
+
+ return IOUtils.toByteArray(new FileInputStream(f));
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+
+
+ public void addClassPath(String path) {
+ if(this.clzPaths.contains(path)){
+ return;
+ }
+
+ this.clzPaths.add(path);
+
+ }
+
+
+
+ public String getClassPath(){
+ return StringUtils.join(this.clzPaths,";");
+ }
+
+ public ClassFile loadClass(String className) {
+ byte[] codes = this.readBinaryCode(className);
+ ClassFileParser parser = new ClassFileParser();
+ return parser.parse(codes);
+
+ }
+
+
+
+ // ------------------------------backup------------------------
+ public String getClassPath_V1(){
+
+ StringBuffer buffer = new StringBuffer();
+ for(int i=0;i s) {
+ if(s == null || s.isEmpty()){
+ return;
+ }
+ Stack tmpStack = new Stack<>();
+ while(!s.isEmpty()){
+ tmpStack.push(s.pop());
+ }
+
+ s = tmpStack;
+
+ }
+
+ /**
+ * QQ号为:247565311的解法
+ * @param s
+ */
+ public static void reverse_247565311(Stack s){
+ if(s == null || s.isEmpty()) {
+ return;
+ }
+
+ int size = s.size();
+ Stack tmpStack = new Stack();
+
+ for(int i=0;ii){
+ tmpStack.push(s.pop());
+ }
+ s.push(top);
+ while(tmpStack.size()>0){
+ s.push(tmpStack.pop());
+ }
+ }
+ }
+
+
+ /**
+ * 假设栈中的元素是Integer, 从栈顶到栈底是 : 5,4,3,2,1 调用该方法后, 元素次序变为: 1,2,3,4,5
+ * 注意:只能使用Stack的基本操作,即push,pop,peek,isEmpty, 可以使用另外一个栈来辅助
+ */
+ public static void reverse(Stack s) {
+ if(s == null || s.isEmpty()){
+ return;
+ }
+
+ Stack tmp = new Stack();
+ while(!s.isEmpty()){
+ tmp.push(s.pop());
+ }
+ while(!tmp.isEmpty()){
+ Integer top = tmp.pop();
+ addToBottom(s,top);
+ }
+
+
+ }
+ public static void addToBottom(Stack s, Integer value){
+ if(s.isEmpty()){
+ s.push(value);
+ } else{
+ Integer top = s.pop();
+ addToBottom(s,value);
+ s.push(top);
+ }
+
+ }
+ /**
+ * 删除栈中的某个元素 注意:只能使用Stack的基本操作,即push,pop,peek,isEmpty, 可以使用另外一个栈来辅助
+ *
+ * @param o
+ */
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public static void remove(Stack s,Object o) {
+ if(s == null || s.isEmpty()){
+ return;
+ }
+ Stack