Why cant we define System.out.println() inside a class
directly?

Answer Posted / venkatachalapathy

we Directly write this line i.e System.out.println()
directly inside a class because println method is static
method in output stream class which are sub classes of
system class.
so every time this method is overridden in our program....
so static methods doesnt require a creation of object.....

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What mechanism does java use for memory management?

749


What is e in java?

748


What is string manipulation?

725


Why do we need singleton?

756


Is java owned by oracle?

790


What is an immutable object?

799


Why is string builder not thread safe?

853


How do you override a private method in java?

709


What are data types in oop?

805


What is meant by null and void?

754


What is a lightweight component?

818


Is age a discrete variable?

746


Explain about automatic type conversion in java?

848


What is subsequence of a string?

861


What are the advantages of user defined functions?

770