简体   繁体   English

System.out.println(); 执行

[英]System.out.println(); Implementation

Can anyone here tell me how System.out.println() is implemented?这里有人能告诉我System.out.println()是如何实现的吗? I have tried many sites but didn't get any satisfactory answer.我尝试了很多网站,但没有得到任何满意的答案。

In System.out.println,在 System.out.println 中,

  • System is a final class.系统是最后一课。
  • out is object of PrintStream class inside system. out 是系统内部 PrintStream 类的对象。
  • println() is a method of PrintStream println() 是 PrintStream 的一个方法

So to print something we need to call a println which is inside PrintStream class whose object is inside System class.Hence System.out.println();所以要打印一些东西,我们需要调用 PrintStream 类中的 println,它的对象在 System 类中。因此 System.out.println();

For more information refer following link有关更多信息,请参阅以下 链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM