jdk 1.5有吧 看看源src
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Queue.html

解决方案 »

  1.   

    直接用Vector就可以吧? add remove isEmpty clear get....
      

  2.   

    希望给出易懂的程序代码,用Vector也可以
      

  3.   

    呵呵,使用List自己写一个咯,Thinking in Java里面有例子,自己着去吧!^_^
      

  4.   

    最好封装起来(包括插入元素,删除元素,判定该队列是否为空,置成空队列,返回队列的第一个元素等等方法)
    --------------------------------------------------------------------------楼主:~)
    Java的集合类很多,应该可以有一个满足你的条件了吧!
      

  5.   

    zealVampire(蚊子) :
    哪个类?
      

  6.   

    你直接使用java提供的各种集合类就可以了,很方便的,你自己基本可以不需要写代码。
    自己封装一下,调用类方法就可以了。
      

  7.   

    //用链表实现的队列
    class Queue extends Object
    {
        private class Node
        {
            Object data;
            Node prev;
            Node next;
        }    private Node head;
        private Node tail;
        public Queue()
        {
            head = new Node();
            tail = new Node();
            head.prev = tail.next = null;
            head.next = tail;
            tail.prev = head;
        }
        public void en(Object item) //进队列(插入元素)
        {
            Node q = new Node();
            q.data = item;
            q.next = tail;
            q.prev = tail.prev;
            tail.prev.next = q;
            tail.prev = q;
        }
        public Object dl() //出队列(删除元素)
        {
            if(! empty()){
                Node p = head.next;
                head.next.next.prev = head;
                head.next = head.next.next;
                return p.data;
            }else
                return null;
        }
        public Object peek() //取头元素(第一个元素)
        {
            if(! empty())
                return head.next.data;
            else
                return null;
        }
        public boolean empty() //判断是否为空
        {
            return (head.next==tail) || (tail.prev==head);
        }
        public void clear() //置空
        {
            head.next = tail;
            tail.prev = head;
        }
        public int elemNum() //获取元素数目
        {
            int num = 0;
            for(Node q=head.next; q!=tail; q=q.next)
                num++;
            return num;
        }
    }
      

  8.   

    应该看一下java中的
    Collection Frameworks