In this context, it is “called” when you call it, and “executed” when the code is actually executed.
Meanwhile, when you call it and the time the code starts, the fields are initialized.
, , , .
:
class Example {
static int report() { System.out.println("initialize"); return 0; }
int x = report();
Example () {
System.out.println("execute");
}
}
, :
System.out.println("invoke");
new Example();
:
invoke
initialize
execute