The Queue implementation in Java has two methods to remove element, One is remove() which throws exception and other one is poll() which returns null for an empty queue. I have two doubts:
- Why
Queuehas different implementation to remove element? - Which implementation to use When?
