jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes how does System.out.println() works Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how does System.out.println() works" Watch "how does System.out.println() works" New topic

how does System.out.println() works

sapana jain
Ranch Hand

Joined: Oct 24, 2007
Posts: 42
from many days i was just thinking that how does the System.out.println() works in java.I refer many books but not getting the right explanation.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14113

'System' is a class (in the package java.lang) that has a member variable called 'out'. The type of 'out' is java.io.PrintStream, as you can see in the API documentation. The method 'println(...)' is a method of class PrintStream.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
It is sorta covered in the JavaRanch Style Guide.
subject: how does System.out.println() works