java 的堆栈:
import java.util.Stack;
Stack<Integer> sk=new Stack<Integer>();
for(int i=0 ; i <10 ; i++)
{
sk.push(new Integer(i));
System.out.println("Push :"+ i);
}
while(!sk.empty())
{
System.out.println("Pop :" + sk.pop() );
}
java 的堆栈:
import java.util.Stack;
Stack<Integer> sk=new Stack<Integer>();