<init>
is the (or one of the) constructor(s) for the instance, and non-static field initialization.
<clinit>
are the static initialization blocks for the class, and static field initialization.
class X {
static Log log = LogFactory.getLog(); // <clinit>
private int x = 1; // <init>
X(){
// <init>
}
static {
// <clinit>
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…