explain System.out.println
Answers were Sorted based on User's Feedback
Answer / ved
system is a static class that is having it's member out.
out is the object of printwriter class.
and println is the method of printwriter class.
that's why we access the member of system class out by it's
name because it is static. and by out we access it's method
prinln .
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / java-novice
System is a class.
out is a public static class variable of the System class.
NOTE: "out" Must be declared public. Otherwise, we cannot
access it as "System.out"
out is of type PrintStream
println is an overloaded method of PrintStream class.
(That's why println method accepts strings, boolean values
or char values)
Here is a good article on that.
http://ruchiram4.blogspot.com/2009/05/java-systemoutprintln-explained-in-oop.html
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / harry
system.out.println is used to display text on the output screen
it has same function as that of printf in c language
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / birendra
system-is a class present in java.lang package .it is a
public final class.
system class import the package java.io.*;
out-out is the object of printStream class.
its syntax is public final static PrintSteam out in the
system class.
println()-it the the method of PrintStream class;
so we can call the static object of system class with the
name of class & with the name of out we can call the method
of printsteam call
System.out.println();
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suneel kumar
System is the Final Class,
Where as out is the object of PrintStrean class,which
reside in the System Class,
and println() is the method in the PrintStream class.
System --> public final class System
out --> public final static PrintStream out =
nullPrintStream();
println() --> public void println(Object x)
{
synchronized (this)
{
print(x);
newLine();
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sankar r k
System is a class of java.lang package
out is a static object of the Printstream class.
println is a function of Printstream class to print on the
console
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ritesh kesharwani
System.out.println()
System is a class.
It provide way how to interact with I\O.
System use one datatype or field is called out.It is a static
field or object.
PrintStream is a class.which define println and print method.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / naresh
system: is a class name
out: is a static variable in system class.when we call out
a printstream object will be created internally.
println(): method of printstream class
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / shankar
System is a final class inside java.lang package
out is a static object..
println() is a method of System class
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mouli
System.out.prtntln()-
System is a final class , Out is variable in that , out is defined for a Printstream class.
Println - > Print the contetnt and then terminate the line
| Is This Answer Correct ? | 0 Yes | 0 No |
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
Does set allows null in java?
how to deploy tomcatserver to weblogic server? write d following steps?
Is alive method in java?
How do you invoke a method?
What is internal iteration in java se 8?
what is comparable and comparator interface?
what are the high-level thread states? : Java thread
What are the advantages of arraylist over arrays?
Is int a class in java?
Is alive in java?
What modifiers are used with an inner class which is a member of an outerclass?