I understand that InputStream is an abstract class and read() is the abstract method. So, how am I being able to use the abstract read() method to read the console input? Which class is implementing the method?
Although the variable "in" is declared to be of type InputStream, it can point to an object of any class that directly or indirectly extends InputStream. The precise name of the class that's used as the System.in object is implementation-specific. If you want to know what it is on your Java implementation, just out of curiosity, just do something like