File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.out.println()....need explanation

 
omar salem
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi greenhorns.....i need explanation for the structure of the 'System.out.println()' statement.....thanks in advance
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi omar salem.

the Question is already been discussed in javaranch forum.
have a look this thread
[ August 22, 2007: Message edited by: Saif uddin ]
 
omar salem
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Saif....i really appreciate it
 
xiao sean
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

it's actually mean break;

for eg.
System.out.println("Hello");
System.out.println();
System.out.println("How are you");

it will print as
Hello

How are you.
 
Muhammad usman shad
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
println is the method from wich we can put a string on the out stream that is in the System object.
This is a syntax of Java used to display a string on the console window or the computer screen.
If you execute:
System.out.println("Hello, world!"),
you will get:
Hello, world.
on the computer screen.

System is the object that represents the computer.
Out is a stream on that.
Print and Println are methods on that out stream.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not quite. System is a class; I am not sure whether it is instantiated to an object or not. It has three static fields, out (not Out) in and err which are streams.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System has only a private constructor and can't be instantiated. All its methods and member variables are static.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Ernest, for sorting out my uncertainty.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic