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.
System.out instanceof PrintStream?System.out.println("Ok, I'm PrintStream"):System.out.println("No, I'm not aPrintStream")
– Acidity