out in System.out.println()

后端 未结 8 1051
刺人心
刺人心 2020-12-01 03:26

Firstly regrets if this is a very basic question and i promote that I\'m still a code monkey. I was asked in an interview to elucidate System.out.println(); I explained the

8条回答
  •  没有蜡笔的小新
    2020-12-01 03:52

    System.out is a normal static attribute, it was set by the JVM through the initializeSystemClass() method during JVM initialization. You can even change it (although it's not recommended) by simply calling System.setOut(printOutStream);, where printOutStream is the stream you want to use as standard output.

    Here's a nice article detailing how does System.out.println() work.

提交回复
热议问题