I have two questions related to the System
class of java.
First, where are in (input) and out (output) objects initialized? As these objects are declared as static and not initialized in the System
class, and System
class does not have a constructor.
The second question is, in (input) object is declared as input stream that is why it reads byte data and the out object is also outputStream
then why it is able to write all type of primitive data. Stream is used to read/write bytes data. Do not say it calls the toString
method.