Originally posted by Krishna Srinivasan:
can anyone explain me about System.out.println(); in detail
Advance Thanx.
I don't know what you really need, but you can read the
java sources for more details. It should be obtained if you select to include java source when installing jdk.
I try to give some information here.
System.out is an instance of class PrintStream - you can find this in class java.lang.System. And class PrintStream has overloaded method println(), such as println(boolean x), println(char x)... Here is one of them:
You can see that it calls its own method print(char x). Here is the code:
It first convert character 'c to a
string, and eventually write it out by calling method write(String s). Method write(..) are also overloaded, one version is:
textOut and charOut are the fundamental streams that do the real work.
You can see a chain of method calling from println() to print(), then to write(). All of these methods are overloaded, so System.out.println() can take different types of parameters.
Is this what you want?