Sitemap
Javarevisited

A humble place to learn Java and Programming better.

System.out.println() Explained

--

System — Concrete Class

Out — Static Reference of Print Stream Class Present in System Class that’s why it is accessible via Class reference.

println — It is a public method present in PrintStream class , which is responsible for printing output , we can override this method also by extending the PrintStream Class.

Performance Analysis of System.out.println()

println() is a method that helps display output on a console. This might be dependent on various factors that drives the performance of this method. The message passed using println() is passed to the server’s console where kernel time is required to execute the task. Kernel time refers to the CPU time. Since println() is a synchronized method, so when multiple threads are passed could lead to the low-performance issue. System.out.println() is a slow operation as it incurs heavy overhead on the machine compared to most IO operations.

Javarevisited
Javarevisited

Published in Javarevisited

A humble place to learn Java and Programming better.

Java Spring Decoded
Java Spring Decoded

Written by Java Spring Decoded

All Articles related to java , spring , Backend Development and System Design.

No responses yet