0

I am confuse what is .out in "System.out.println();"?

12th Apr 2020, 8:07 AM
Muhammad Asad
Muhammad Asad - avatar
5 Respostas
+ 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
12th Apr 2020, 8:55 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
System is a class, println() is a method , But why we use .out Stream ??
12th Apr 2020, 9:05 AM
Muhammad Asad
Muhammad Asad - avatar
+ 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
12th Apr 2020, 11:03 AM
zemiak
0
so what is the propose of .out PrintStream object in this statement ??
12th Apr 2020, 11:14 AM
Muhammad Asad
Muhammad Asad - avatar
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/
12th Apr 2020, 4:43 PM
zemiak