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

What is the difference between preparedstatement and statement in java?

553


Is null keyword in java?

525


What is integer parseint?

553


Where import statement is used in a java program?

610


Can we write any code after throw statement?

609






what is nested class in java?

601


What are advantages of using Java?s layout managers than windowing systems?

1859


What is the instance of an object?

551


What is reflexive association?

1008


Can I overload to string method

966


What are static variables and functions?

620


Why should we use singleton pattern instead of static class?

460


What are void pointers?

714


Can we have multiple classes in single file ?

607


What are the types of exceptions?

591