What's the meaning of System.out.println in Ja

2019-01-05 10:24发布

Is this static println function in out class from System namespace?

namespace System {
  class out {
    static println ...
  }

How can I interpret this name? And where in JRE this function is defined? In java.lang.System/java.lang.Object?

20条回答
我欲成王,谁敢阻挡
2楼-- · 2019-01-05 11:03

System - class which is final in nature. public final class System{}. Belongs to java.lang package

out - static reference variable of type PrintStream

println() - non static method in PrintStream class. PrintStream belongs to java.io package.

To understand it better you can visit : How System.out.println() Works In Java

查看更多
甜甜的少女心
3楼-- · 2019-01-05 11:05

System is the java class.

out is the instance and also static member of PrintStream.

println is the method of PrintStream.

查看更多
ゆ 、 Hurt°
4楼-- · 2019-01-05 11:05
System.out.println

System - is a class in java.lang pacakge. out is a static data member of System class and references a variable of PrintStream Class.

查看更多
贼婆χ
5楼-- · 2019-01-05 11:07

System is a class of java.lang package, out is an object of PrintStream class and also static data member of System class, print() and println() is an instance method of PrintStream class. it is provide soft output on console.

查看更多
对你真心纯属浪费
6楼-- · 2019-01-05 11:09

System is a class in java.lang package

out is a static object of PrintStream class in java.io package

println() is a method in the PrintStream class

查看更多
干净又极端
7楼-- · 2019-01-05 11:10

System is a class in java.lang package.

out is the static data member in System class and reference variable of PrintStream class.

Println() is a normal (overloaded) method of PrintStream class.

查看更多
登录 后发表回答