What is the difference in the Queue poll () and remove ()?

remove (), if the queue is empty when an exception is thrown

The poll () will return null

 
 

The poll () will return null

Guess you like

Origin www.cnblogs.com/williamjie/p/11458981.html