This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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