This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes System.out.println()....need explanation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "System.out.println()....need explanation" Watch "System.out.println()....need explanation" New topic

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

omar salem
Ranch Hand

Joined: Aug 22, 2006
Posts: 34
Hi greenhorns.....i need explanation for the structure of the 'System.out.println()' statement.....thanks in advance

Have a sip of Java !!!
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

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 ]

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
omar salem
Ranch Hand

Joined: Aug 22, 2006
Posts: 34
Thanks Saif....i really appreciate it
xiao sean
Ranch Hand

Joined: Aug 20, 2007
Posts: 44

it's actually mean break;

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

it will print as

How are you.
Muhammad usman shad
Ranch Hand

Joined: Jan 06, 2010
Posts: 30
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

Joined: Oct 13, 2005
Posts: 44460
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

Joined: Jul 08, 2003
Posts: 24193

System has only a private constructor and can't be instantiated. All its methods and member variables are static.

[Jess in Action][AskingGoodQuestions]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44460
Thank you, Ernest, for sorting out my uncertainty.
I agree. Here's the link:
subject: System.out.println()....need explanation
It's not a secret anymore!