English 中文(简体)
在java的“System.out.println()”的“实际值”是什么。
原标题:What is the Exact Meaning of the "System.out.println()" in java
  • 时间:2012-01-12 09:56:49
  •  标签:
  • java

任何人都能够确切解释以下含义:

System.out.println()

我知道:

系统:

www.un.org/Depts/DGACM/index_spanish.htm 我不知道“没有”<>。

www.un.org/Depts/DGACM/index_spanish.htm 法定方法。

问题回答

out is a static field that holds a reference to PrintStream object.

http://www.ohchr.org。

此处为<代码>out在<编码>上的变化>。

/**
 * The "standard" output stream. This stream is already
 * open and ready to accept output data. Typically this stream
 * corresponds to display output or another output destination
 * specified by the host environment or user.
 * <p>
 * For simple stand-alone Java applications, a typical way to write
 * a line of output data is:
 * <blockquote><pre>
 *     System.out.println(data)
 * </pre></blockquote>
 * <p>
 * See the <code>println</code> methods in class <code>PrintStream</code>.
 *
 * @see     java.io.PrintStream#println()
 * @see     java.io.PrintStream#println(boolean)
 * @see     java.io.PrintStream#println(char)
 * @see     java.io.PrintStream#println(char[])
 * @see     java.io.PrintStream#println(double)
 * @see     java.io.PrintStream#println(float)
 * @see     java.io.PrintStream#println(int)
 * @see     java.io.PrintStream#println(long)
 * @see     java.io.PrintStream#println(java.lang.Object)
 * @see     java.io.PrintStream#println(java.lang.String)
 */
public final static PrintStream out = nullPrintStream();

这就是<条码>印本/代码>。 方法如下:

/**
 * Terminates the current line by writing the line separator string.  The
 * line separator string is defined by the system property
 * <code>line.separator</code>, and is not necessarily a single newline
 * character (<code> 
 </code>).
 */
public void println() {
newLine();
}

"out" is a static public field with Stream value.

public final class System {
    public final static PrintStream out = nullPrintStream();
...
}

<代码>out是类别静态领域<代码>PrintStream。 http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/System.html

Q. 为了确定特定法典中S的长度,你必须用什么文字代替Ans?

 class Test{

       static String S="java";

       public static void main(String[] args) {

       System.out.println(Ans);

       }

 }

 Ans: Test.S.length()
  1. 在这里,S是试验舱的固定型号。

  2. 因此,静态变量是使用类别——名称:static_variable_name as Test.S

  3. 为了寻找静态变量S的长度,S是物体,而我们知道物体可进入S.length()类的长度方法。

System.out.println()中使用了Same概念:

 class System{

      static PrintStream out;

 }
  1. 职等:姓名

  2. 在系统类别中,印刷机的固定变量是存在的。 它还是同一类的印刷机和印刷机。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签