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

Answer Posted / madhu

we can override only class methods and we can't override the
output Stream methods.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the protected method modifier?

559


What is the exact difference in between Unicast and Multicast object?

1500


What is classpath?

544


What is use of static method?

528


What is byte data type?

545






What is the use of using enum to declare a constant?

548


What is static block?

581


Can list be final in java?

485


Using callable statement how can you pass out parameters, explain with example?

578


What is the difference between the prefix and postfix forms of the ++ operator?

552


Can a string be null?

538


What is diamond operator in java?

492


When does an object becomes eligible for garbage collection in java?

573


How does indexof work?

502


Which package is used for pattern matching with regular expressions?

635