explain System.out.println

Answer Posted / padmakar

System is a class in java.lang package.
as per the concept of java , the instance methods will be called with the objects and the static methods will be called with the class name, the print() method and println() methods are defined as instance methods in the printstream class, which is treated as static in the system class.
so the println() will be called with object of printstream class
i.e out.println() which is static in nature in system class.

so, it is System.Out.println()

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we execute java program without main method?

516


Does unicode support all languages?

511


What is the memory leak in java?

522


Name four container classes.

552


What does split function do in java?

530






What does t in java mean?

530


Which access specifier can be used with class ?

528


How will you initialize an Applet?

614


Why java is object oriented?

582


Why should we use singleton pattern instead of static class?

456


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

500


Implementations of set interface?

555


What is difference between next () and nextline () in java?

531


Can we override constructor in java?

572


Explain notify() method of object class ?

604