Does the System.out object belong to class System or class PrintStream?

user2236096 picture user2236096 · May 16, 2013 · Viewed 10.5k times · Source

I'm new to programming and I just started learning Java. I'm curious that does the object System.out belong to class System or class PrintStream?

I referred to a textbook, JAVA CONCEPTS 4/e. The textbook states that to use the out object in the System class, you must refer it as System.out but later in the book it states that the System.out belongs to class PrintStream.

I've searched google and stackoverflow but all the answers are too hard for me to understand.

Answer

Philip Helger picture Philip Helger · May 16, 2013

"out" belongs to class "System" and is of type "PrintStream" :)