explain System.out.println

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if constructor is protected in java?

563


Explain method overloading?

573


What is an off by one error in java?

504


Is it possible to override the main method?

535


Explain java coding standards for classes or java coding conventions for classes?

620






how to one war file class to another war file class?

1554


What modifiers are allowed for methods in an interface?

652


What are the advantages of functions?

523


What is internal iteration in java se 8?

631


What is the difference between jfc & wfc?

599


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

516


What is floor in java?

562


What is a numeric literal?

529


What is the purpose of the strictfp keyword?

611


What is update method called?

665