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

Answer Posted / shahid

because println method is not abstract method it is method
of output stream class so we cant override.and it is just
overloded method.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes is string in java?

603


How do you make an arraylist empty in java?

468


What package is math in java?

530


How many bytes is a url?

558


How to make a class or a bean serializable?

537






What is the purpose of static methods and variables?

527


What is a parameter in simple terms?

550


define polymorphism in java

626


What is a parameter in java?

542


How do generics work in java?

514


What is constructor and virtual function? Can we call a virtual function in a constructor?

674


How we can run a jar file through command prompt in java?

514


Give few examples of final classes defined in Java API?

698


enlist some features of jdk.

553


What are different types of references?

524