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 are the features of java?
if arraylist size is increased from initial size what is the size of arraylist...suppose initial is 100 , if i add 101 element what is the size...
How would overload a function based on return type?
Can java object be locked down for exclusive use by a given thread?
What is the difference between JVM and JRE?
Can main() method in java can return any data?
Is java util list serializable?
What is the difference between path and classpath variables?
How long will it take to learn java?
which method is used to know the status of the Thread?
Can an abstract class have a constructor?
Can you access non static variable in static context?