Is this static println
function in out
class from System
namespace?
namespace System { class out { static println ...
System.out.println();
System is the class
out is a variable in the System
class and it is a static
and variable type is PrintStream.
Here is the out
variable in System
class:
public final static PrintStream out = null;
You can see implementation of System here.
println()
is a overloaded method in PrintStream
class.
PrintStream
includes three overloaded printing methods, those are:
print()
println()
printf()
You can see implementation of PrintStream here.
You cannot instantiate System
class and it is child class of Object
and the Object
is the father(superclass) of every classes including classes that you defined.
Here is what the oracle docs says:
public final class System extends Object
The
System
class contains several useful class fields and methods. It cannot be instantiated.Among the facilities provided by the
System
class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.Since: JDK1.0
If you donot know what is meant by instantiate, read this questioh. It is C# question but the concept is same.
Also, What is the difference between an Instance and an Object?
If you donot know what is meant by overload read this quesiotn.