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
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.
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.
"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
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop