10 Years
Discussion Span
Last Post by sarath.koiloth

System.out.println(String s) simply gets the Java console to print out a line of text. Surely you came across it in Hello World?

Which three are you referring to? The "System" "out" and "println" parts of the command? If so, read it this way, System.out uses the default output stream, and println is a stream command which tells the stram to display a line of text. The link below will take you directly to the System.out field entry of the API.

More details can be found here, the Java API. I suggest that you bookmark it.


System is a class, using it directly in this manner means you want to use a public static item from it.

out is the public static item you are using. It is an OutputStream that is used for the Standard Output (STDOUT, there is another for STDERR) of the running java application.

println() is of course a method of an OutputStream object that prints bytes to the device pointed to by the OutputStream object. In this case, usually the command line or an Application Console, unless redirected.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.