Search notes:

Write text to standard out (console) with with println

println, which is defined in the class class java.io.PrintStream allows to write text into a stream.
As it happens, System.out is an instance of java.io.PrintStream which points to standard out. Thus, it is possible to write text to the console with System.out.println("some text").
public class println {

  public static void main(String[] argv) {

    java.io.PrintStream ps = System.out;

    ps.println("Hello World, slightly different.");

  }

}
Github repository JavaClasses, path: /java/io/PrintStream/println.java

See also

Java classes

Index