Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataInputStream

 
Karups
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
Will you explain me about System.out.println()
I know that System is a class name if is a static class we can call without creating object.That is classname.method(System.println())
println() is a method in the class system then why we are using out here. Plz let know this
Thanks
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Welcome to the Ranch. Please register with a valid user name. We prefer to be professional here by using first name + space + last name. Read about our naming policy:
http://www.javaranch.com/name.jsp
Regarding System:
You are correct in saying that it is a static class. However you are wrong about println being a method. The variable out is defined in System:
public final static PrintStream out = nullPrintStream();
The class PrintStream has numerous println methods that can be used in the following manner:
System.out.println( "" );
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic