explain System.out.println
Answers were Sorted based on User's Feedback
Answer / vishal
System :
Its a built-in class present in java.lang package.
This class has a final modifier, which means that, it cannot
be inherited by other classes.
It contains pre-defined methods and fields, which provides
facilities like standard input, output, etc.
out :
Its a static final field (ie, variable)in System class
which is of the type PrintStream (a built-in class, contains
methods to print the different data values).
static fields and methods must be accessed by using the
class name, so ( System.out ).
out here denotes the reference variable of the type
PrintStream class.
println() is a public method in PrintStream class to print
the data values.
Hence to access a method in PrintStream class, we use
out.println() (as non static methods and fields can only be
accessed by using the refrence varialble)
System.out.println();
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chandan
system is a class
out ia an object of printwriter class
println is a method of printwriter class
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pragya
System:It is a class in lang package and
out:it is static member of System class and object of PrintStream class........
println():this is the method defined in PrintStream class
which prints the sentence in new line
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mayur gajera
'System' is a class in java.lang package
'out' is a static object of PrintStream class in java.io
package
'prinln()' is method in the PrintStream class
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / praveen
System is a final class in java.lang package
out is a public static final refrence of PrintStram
in System
print() and println()are the methods in PrintStream
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / raju kumar (bca)
ex:-class System
{
static printstream out= new printstream();
static Inputstream in= new Inputstream();
}
conclusion:=>
"system" is a class&packege(java.lang).
"out" is a static object of printstream class (java.io).
and "println()"is a method of out calss.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vivek ingle
System is a class in System class their is a declaration of
out Static data member Just Like (public static final
PrintStream out).
Out is Static Data Member.
Println is a method in PrintStaream class.
Public Class System{
public static final PrintStream out;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / swati vora
system is a class.
out is a object.
println() is a method
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajendra chandra
System:-it is class present in the java.lang package
out:-it is the static variable of PrintStream class defined inside system class
println():- is a method of PrintStream Classand this class having some method which are declared pubic void type
Is This Answer Correct ? | 0 Yes | 0 No |
System is a built-in class present in java.lang package.
This class has a final modifier, which means that it cannot
be inherited by other classes.
It contains pre-defined methods and fields, which provides
facilities like standard input, output, etc.
out is a static final field (ie, variable)in System class
which is of the type PrintStream (a built-in class,
contains methods to print the different data values).
static fields and methods must be accessed by using the
class name, so ( System.out ).
out here denotes the reference variable of the type
PrintStream class.
println() is a public method in PrintStream class to print
the data values.
Hence to access a method in PrintStream class, we use
out.println() (as non static methods and fields can only be
accessed by using the refrence varialble)
Is This Answer Correct ? | 0 Yes | 0 No |
Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?
What is the need to implement Serializable interface (with no methods) for objects which are to be serialized ? We can write our own functionality which writes objects to streams then why we need to implement and tell JVM that which objects can be serialized.
Why java strings are immutable in nature?
What is a predicate method?
Is java hard to learn?
Where is the find and replace?
What is meant by Session? Explain something about HTTP Session Class?
Can we serialize singleton class?
What is a "pure virtual" member function?
What is the old name of java?
What are the 4 types of characters?
What is heterogeneous in java?