The explanation is in the comments:
/**
* The following two methods exist because in, out, and err must be
* initialized to null. The compiler, however, cannot be permitted to
* inline access to them, since they are later set to more sensible values
* by initializeSystemClass().
*/
And initializeSystemClass()
uses native methods to initialize the standard streams to non-null values. Native code can reinitialize variables that are declared final.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…