| Author |
what is the diffrence b/w java.util.PriorityQueue.add(E e) and java.util.PriorityQueue.offer(E e)?
|
Minhaj Mehmood
Ranch Hand
Joined: Jan 22, 2007
Posts: 400
|
|
what is the diffrence b/w java.util.PriorityQueue.add(E e) and java.util.PriorityQueue.offer(E e)?
|
SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
|
 |
Neha Daga
Ranch Hand
Joined: Oct 30, 2009
Posts: 504
|
|
|
they both are same.
|
SCJP 1.6 96%
|
 |
Wouter Oet
Saloon Keeper
Joined: Oct 25, 2008
Posts: 2700
|
|
Thats because it's an unbounded queue. If you have a bounded queue the functions are not the same.
Add
Offer
|
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
|
 |
 |
|
|
subject: what is the diffrence b/w java.util.PriorityQueue.add(E e) and java.util.PriorityQueue.offer(E e)?
|
|
|