0
I am confuse what is .out in "System.out.println();"?
5 odpowiedzi
+ 2
//It's explained in this course
https://www.sololearn.com/learn/Java/2137/
if you fill problem again after this try me mentioning your doubt here
+ 1
System is a class, println() is a method , But why we use .out Stream ??
+ 1
out is member variable in class System, there is stored PrintStream object
System {
public static final PrintStream out;
}
//try this
java.io.PrintStream s = System.out;
s.println( s ); // java.io.PrintStream@4617c264
0
so what is the propose of .out PrintStream object in this statement ??
0
output stream object provides a way how to send data to system resources like files on a hard disk, display, printer ...
https://howtodoinjava.com/java/io/how-java-io-works-internally-at-lower-level/