Java accesses the static variables of the parent class, and the loading of the subclass is a problem.


console shows that ChildClass has been loaded, why not output c init

Jvm
Mar.14,2021

the static block of the java class is executed not in load, but in initialize, involving two cases, new an instance, or accessing static methods, you output .a variable in main and do not access the members of childClass, so you will not execute the static block of childClass, if you output ChildClass.b,.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38659-2c114.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38659-2c114.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?