+ 4

In what class System.out.println(); is defined?

Just like in C++, cout and cin are defined in the header file iostream. Where is the definition of System.out.println() defined in Java?

2nd Sep 2018, 8:35 AM
Tanish Kushwaha
Tanish Kushwaha - avatar
3 ответов
+ 10
It's defined in the out member of type PrintStream type of System class. You can always refer to the official Java Oracle Docs here:- https://docs.oracle.com/javase/7/docs/api/java/lang/System.html
2nd Sep 2018, 9:55 AM
Zephyr Koo
Zephyr Koo - avatar
+ 4
System is final class in java.lang.System out is an object reference of PrintStream class defined in System class as public, static, final println() is a method of java.io.PrintStream class 💗 🙆‍♂️🤗
3rd Sep 2018, 12:31 AM
NimWing Yuan
NimWing Yuan - avatar
+ 3
System class
3rd Sep 2018, 7:09 PM
Aarav Raj
Aarav Raj - avatar