Java中System.out.println的含义是什么? [英] What's the meaning of System.out.println in Java?

查看:190
本文介绍了Java中System.out.println的含义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自系统 out 类中的这个静态 println 函数c> namespace?

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


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

我该如何解释这个名字?在JRE中定义了这个函数?在 java.lang.System / java.lang.Object

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

推荐答案

不。实际上 out System 类中的静态成员(不是在.NET中),是<$的实例C $ C> PrintStream的。 println PrintStream 类的正常(重载)方法。

No. Actually out is a static member in the System class (not as in .NET), being an instance of PrintStream. And println is a normal (overloaded) method of the PrintStream class.

请参阅 http:// download .oracle.com / javase / 6 / docs / api / java / lang / System.html#out

实际上,如果 / 错误 / 中是类,它们将以大写字母命名(由于 Out / Err / In ) href =http://www.oracle.com/technetwork/java/codeconventions-135099.html\"rel =noreferrer>命名约定(忽略语法)。

Actually, if out/err/in were classes, they would be named with capital character (Out/Err/In) due to the naming convention (ignoring grammar).

这篇关于Java中System.out.println的含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆