Code example for Queue

Methods: element

0
    public synchronized boolean add(E e) {
        return q.add(e);
    } 
 
    public synchronized E element() { 
        return q.element();
    } 
 
    public synchronized boolean offer(E e) {
        return q.offer(e);
    } 
 
    public synchronized E peek() { 
        return q.peek();
    } 
 
    public synchronized E poll() { 
        return q.poll();
    }