System and Java

I'm a new Java user Recently, I learned that (we use it in system. Out. Println) is a Java standard output object

My question is; I have never created this object myself, or found any code to create this object So how to use it?

And I think system is a class name If so, is it a static member of the system class because we access it without creating a new object of the system class?

Solution

Yes, system is a class, and out is the static member variable of the class

public final class System {
    public static final PrintStream out = ...;
    public static final PrintStream err = ...;
    public static final InputStream in = ...;
    ...
}

See Java documentation for system class

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>