JAVA 队列四种API

队列四种API

方式 抛出异常 有返回值,不抛异常 阻塞等待 超时等待
添加 add offer()
put()
offer(E e, long timeout, TimeUnit unit)
移除 remove poll()
take()
poll(long timeout, TimeUnit unit)
判断队列首 element peek() ----- -----

猜你喜欢

转载自blog.csdn.net/qq_42673067/article/details/129918644
今日推荐