aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "System.out.println()....need explanation" Watch "System.out.println()....need explanation" New topic
Author

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 ]

Saifuddin..
[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
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

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
Sheriff

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

Joined: Jul 08, 2003
Posts: 24187
    
  34

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
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
Thank you, Ernest, for sorting out my uncertainty.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.out.println()....need explanation