Using Scanner class, input from keyboard is read. We pass System.in as an oject to Scanner class while constructing it. "in" is an object type of InputStream abstract class. In InputStream class "in" has been made as static as well as final and been initialized to null (as per the source code given for windows). Then it can not be changed anywhere else.
So basically what we pass to Scanner class is a reference to a null value. If this is the case, then how the input from keyboard is read correctly ?
Can you please help me.