Behavior of static blocks with inheritance
As I understand. You don’t call any Derived properties (myVar belongs to Base, not to Derived). And java is not running static block from Derived. If you add some static field to Derived and access it, then java executes all static blocks. class Base { static public int myVar; } class Derived extends Base { … Read more