explain System.out.println

Answers were Sorted based on User's Feedback



explain System.out.println..

Answer / trip

System: Class of java.lang package
out: predefine stream variable
println: method of PrintStream class (which is a type of
object reference by System.out)

Is This Answer Correct ?    15 Yes 10 No

explain System.out.println..

Answer / dipanjan paul

//--There was a slight mistake in my previous post--below
is the corrected one--//
'System' is a class in 'java.lang' package, which is a
final class(can not be inherited) and its constructor is
private(can not be instantiated)
'out' is a static member variable of 'System' class which
is of type 'PrintStream'
'println()' is a method of 'PrintStream' class
So 'System.out.println()' means calling of method 'println
()'of the static 'PrintStream' type variable 'out'
of 'System' class.
And is used to print a String to the system console.

Is This Answer Correct ?    4 Yes 0 No

explain System.out.println..

Answer / zahid hussain indher

System is class of java.lang Package and we khow that all
the member of System class are static similiarly 'out' is
object of java.io.PrintStream class we use System.out mean
out is static object of java.io.PrintStream class and we are
familiar that if object of any class is achieved then we can
call the methods of that class and java.io.PrintStream class
provide a non-static method println() that is being called
by out object
System.out.println();
System = class
out = static object of java.io.PrintStram class
println()= is method of java.io.PrintStream

Hope Like the Answer

Is This Answer Correct ?    4 Yes 0 No

explain System.out.println..

Answer / gaurav kamra

System.out.println()

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)

System.out.println();

eg:

int i = 3;
System.out.println(i);


the above code prints the value of 3 in the screen and
brings the control to the next line.

Is This Answer Correct ?    2 Yes 0 No

explain System.out.println..

Answer / moin

is a function used to print the valus in command line

Is This Answer Correct ?    2 Yes 0 No

explain System.out.println..

Answer / nithyapriya

System.out.println

System - is the predefined class that provide access to
the system.

out - is the output stream that is connected to the console.

println - built-in method, which accomplish output

Is This Answer Correct ?    2 Yes 0 No

explain System.out.println..

Answer / srihari desai

System is a pre-defined class present in java.lang package.
System is a final class since it cant be extended.
There is one more pre-defined class called PrintStream
present in java.io package.
The Object of PrintStream class created as static in System
class.
In PrintStream class There are Total 9 Overloaded println n
print methods.
Each println/print methods takes different data type as a
parameter like
println(int)
println(float)
println(double)
println(short)
println(byte)
etc
Thank u 1 n all

Is This Answer Correct ?    2 Yes 0 No

explain System.out.println..

Answer / sumit lole

System.out.println()

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)

System.out.println();

eg:

int i = 3;
System.out.println(i);


the above code prints the value of 3 in the screen and brings the control to the next line.

Is This Answer Correct ?    2 Yes 0 No

explain System.out.println..

Answer / kamineni

Here System is a class available in java default package
java.lang.. It contains fields and methods that support
standard input n output facilities.System class has Final
modifier so it cant be inherited..
out is a static field in System class of PrintStream
type(printstream is a built in class contains methods to
print different data tyes)
println is the method of the printstream class to print
different values..
Example:
class System
{
static PrintStream out;
'
'
'
'
}
class PrintStream
{
void println();
void print();
'
'
'
}

System.out.println() means
System is a class and out is a static field so we acces it
by using class name..
so System.out
and println is a method of PrintStream..so non static
methods should access using reference or object and out is
the reference(holds the adress of PrintStream object) of
PrintStream so we access it using out..
so System.out.println()..

Is This Answer Correct ?    2 Yes 0 No

explain System.out.println..

Answer / vishwajeet

SYSTEM is an class.
OUT is an object PrintStream class defined in System class.
OUT is declared as public, static and final.
Println() is a method of PrintStream class.
The println() method is called with out object.
The out object is called with System class.


To say simple, println() is a method of PrintStream class.
out is an object of PrintStream class defined in System class.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the high-level thread states in java programming?

0 Answers  


How do you use wildcards?

0 Answers  


When is an object subject to garbage collection?

0 Answers  


How could Java classes direct program messages to the system console, but error messages, say to a file?

2 Answers  


What are event-delegation model and event-inheritance model? Which is best?

1 Answers  






What are the new features in java 8?

0 Answers  


Is hashset sorted in java?

0 Answers  


What are classloaders?

0 Answers  


Give me an example of array and linked list? Where they can be used?

0 Answers   Ericsson,


Differentiate between a class and an object.

0 Answers  


placement papaers of spring computing technology

0 Answers   Spring Computing Technologies,


Define interface in java?

0 Answers  


Categories