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

Name the types of 'priority'?

2 Answers  


Write a program to reverse array in place?

0 Answers  


What is a jagged array in java?

0 Answers  


Define how destructors are defined in java?

0 Answers  


I need to know about complete topic in java's collections i with an examples

1 Answers   TCS,






Can we overload the main() method?

0 Answers  


What is flush () in java?

0 Answers  


What is stack explain?

0 Answers  


What is the difference between an array and an array list?

0 Answers  


What is byte data type?

0 Answers  


Can we use a default constructor of a class even if an explicit constructor is defined?

0 Answers  


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.

0 Answers   V2 Solutions,


Categories