aspose file tools*
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: 41885
    
  63
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 - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how does System.out.println() works