Static properties of classes and classes
Static variable: A member variable that is "static" decorated under a class.
Program compilation process: Java as an example: Java is a static language, after we have written the Java program, the main is to write. java files, The compiler then compiles to a. class file and then parses and executes the. class file through a different platform's JVM, so that Java is a cross-platform language, or Java has a different platform JVM to achieve cross-platform.
Class is created: When the class is loaded it is classloader to load the class, and if the class inherits other classes it needs to first load the parent class and then load the current class. While loading a class, you need to initialize the static initialization block, and then load the static method and static members. The static property is created at this time. The class is then destroyed when the virtual machine terminates (system.exit (0);). This is the life cycle of class and static properties.
Static variables for classes and classes