Take the PriorityQueue for example http://java.sun.com/j2se/1.5.0/docs/api/java/util/PriorityQueue.html#offer(E)
PriorityQueue
Can anyone give me an example of a Queu
There is no difference for the implementation of PriorityQueue.add:
PriorityQueue.add
public boolean add(E e) { return offer(e); }
For AbstractQueue there actually is a difference:
public boolean add(E e) { if (offer(e)) return true; else throw new IllegalStateException("Queue full"); }