Out of curiosity I was looking through the source code for some of the Java API classes found at docjar.com. I saw the java.lang.System class and saw that the PrintStream "out" (i.e., System.out) had the following code:
public final static PrintStream out = null;
and in the comments it says:
The "standard" output stream. This stream is already
open and ready to accept output data.
My queston is, I know final variables can't be modified, so why is it null when declared? Why doesn't Java throw a NullPointerException when a method for "out" is called? The same goes for System.in as well.
Thanks for any clarification.