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 |
what us Dyna action form?
4 Answers Aithent Technologies,
Difference between overriding and overloading in java?
What is variable and example?
Static Variable can referred in non-static method?
Which api is provided by java for operations on set of objects?
What is mean by exception?
Define interface in java?
How to change the priority of thread or how to set the priority of thread?
What is an error in java?
What is the use of accept () method in java?
What is meant by method overriding?
can any one send me the example program of immutable class?