is System.in an object reference of InputStream class?
问题 InputStream is an Abstract class.Then how are we able to access System.in.And moreover int read() is an abstract method in InputStream class.Then how are we able to access System.in.read() method if read() is an abstract method. Like int a=System.in.read(); System.out.println((char)a); 回答1: I suggest you to read more about abstraction and inheritance methods in Java. If you extend an abstract class, you have to implement its abstract methods. This way, you provide an implementation for it,