Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

从源码看PriorityQueue - Vgearen's Notes #6

Open
VGEAREN opened this issue Dec 22, 2021 · 0 comments
Open

从源码看PriorityQueue - Vgearen's Notes #6

VGEAREN opened this issue Dec 22, 2021 · 0 comments

Comments

@VGEAREN
Copy link
Owner

VGEAREN commented Dec 22, 2021

https://note.vgearen.com/2021/12/22/%E4%BB%8E%E6%BA%90%E7%A0%81%E7%9C%8BPriorityQueue/

add/offer java.util.PriorityQueue#add 将指定元素插入此优先级队列。返回:true (由Collection.add指定)抛出:ClassCastException – 如果根据优先级队列的顺序无法将指定元素与当前在此优先级队列中的元素进行比较 NullPointerException – 如果指定的元素为空

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant