在 Queue 中 poll()和 remove()有什么区别?

remove() ,如果队列为空的时候,则会抛出异常

而poll()只会返回null

 
 
posted @ 2019-09-04 14:35  割肉机  阅读(3364)  评论(0编辑  收藏  举报