wood burning stoves 2.0*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how does System.out.println() works" Watch "how does System.out.println() works" New topic
Author

how does System.out.println() works

sapana jain
Ranch Hand

Joined: Oct 24, 2007
Posts: 42
what happens in the background when we write system.out.println().please make it because we know that out is the static member of System class then how can we call a method with i.e println()with the help of a variable because as methods are always called with object.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
out is a static field in System that has been assigned an object of class PrintStream. So you can call any methods of that class.
[ April 15, 2008: Message edited by: Ulf Dittmer ]

Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how does System.out.println() works
 
Similar Threads
Majji question - NaN
try,catch
intuitive equals exam q, help
#60 FROM JAVA CAP
Array value