简单的栈与队列
/*package mode02.Quene;
import java.util.Queue;
import java.util.LinkedList;
import java.util.Stack;
public class QueueTrain {
public static void main(String[] args) {
Queue<String> queue = new LinkedList<String>();
queue.offer("Hello");
queue.offer("World!");
queue.offer("你好!");
System.out.println(queue.size());
String str;
while ((str = queue.poll()) != null) {
System.out.print(str + " ");
}
System.out.println();
System.out.println(queue.size());
Stack<String> es = new Stack<String>();
es.push("Hello");
es.push("world");
System.out.println(es.size());
while (!(es.empty())) {
System.out.println(es.peek());
es.pop();
}
System.out.println(es.size());
}
}*/