The System class cannot be instantiated anyway (cf. Javadoc).
This is achieved by setting the constructor to private:
private System() {
}
However, the System class in openj9 for example is partially filled by call of the afterClinitInitialization()
method, which is called after thread initialization.
In there, the out
Variable is actually initialized:
setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true));
See:
System.afterClinitInitialization()
Thread.initialize()
After that it stops being traceable via Github, but I guess you get the point. The initialization is just done by the JVM and due to out
being static, no instance of System
is needed to access the variable.
The topic of static variables however is well covered:
What does the 'static' keyword do in a class?
Static (Keyword) - Wikipedia.com
And to fully understand that, you must have a decent knowledge of the JVM and native programming, where I have to surrender myself.