从源码看PriorityQueue

add/offer

java.util.PriorityQueue#add

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

阅读更多

JAVA注解的底层实现

前言

注解的声明如下:

{InterfaceModifier} @interface Identifier AnnotationTypeBody
接口修饰符 @interface 注解标识符 注解类型的内容

阅读更多