aspose file tools*
The moose likes Beginning Java and the fly likes System.out.println() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "System.out.println()" Watch "System.out.println()" New topic
Author

System.out.println()

meraman odedra
Greenhorn

Joined: Oct 05, 2005
Posts: 1
I have one query plz explain me

here
System.out.println();
What is System?
What is out?
What is println()?
thanx
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Frankly, this sounds very much like a homework question, so I'm reluctant to give you a straight answer.

What do you know about Java or OOP? Do you know what a class is? A field? A method?

Anyway, moving to Java in General (beginner), where this question really belongs...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
Originally posted by meraman odedra:
I have one query plz explain me

here
System.out.println();
What is System?
What is out?
What is println()?
thanx


I try to respond but i am a beginner to so anybody could correct me.

Deduction looking javadoc:

System is a java.lang class. From javadoc :
The System class contains several useful class fields and methods. It cannot be instantiated. Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.

out is a static field of the system class, it contains an object PrintStream that rapresent the standard output, wich by default is the console.
From javadoc :
The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.
For simple stand-alone Java applications, a typical way to write a line of output data is:
System.out.println(data)
See the println methods in class PrintStream.

println() is a method of PrintStream class.

So at the end i suggest you to look at java documentation and try to understand all base classes as java.lang package.


bye, <br />Marco
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Marco Vanoli:
...i suggest you to look at java documentation and try to understand all base classes as java.lang package.

Excellent advice!


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Rick Portugal
Ranch Hand

Joined: Dec 17, 2002
Posts: 243
Seems like overkill to me. java.lang contains all sorts of classes. It is not necessary to learn about SecurityManager and ThreadGroup if you just want to understand how to print something.


IBM 286, SCJP, SCWCD, EIEIO
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Rick Portugal:
Seems like overkill to me. java.lang contains all sorts of classes. It is not necessary to learn about SecurityManager and ThreadGroup if you just want to understand how to print something.

Yes, you're probably right about that. I just thought that going to the API documentation for these types of questions is the best approach.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.out.println()