About static
Static methods cannot access non-static variables. All other MS functions are supported.
Static methods do not use new objects and are called directly by class names. (For example, math. Random ())
Final variable to be initialized
As long as the main is in this class, the static block static {} is first executed (first parent class, then subclass), and then the commands in main are executed. The constructor is also a parent class and a Child class. (See headfirstp310)
{} Is a non-static block. When a constructor is encountered, it is executed before each specific Constructor (first parent class {}, then parent class constructor, then subclass {}, constructor)
<Original statement: A non-static block can be considered as the first part of the constructor after executing the parent class constructor. In short, it is a non-static block before the constructor.
Explicit static initialization (static {blahblahbalh}) is run during object access. Non-static instance initialization (directly included in {}) is run before the constructor is called, for details, see thinking in Java P 186>