简体   繁体   中英

System.out.println(); Implementation

Can anyone here tell me how System.out.println() is implemented? I have tried many sites but didn't get any satisfactory answer.

In System.out.println,

  • System is a final class.
  • out is object of PrintStream class inside system.
  • println() is a method of 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();

For more information refer following link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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