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

Can a class be defined inside an interface?

566


what is object slice?

1585


What is the synonym of framework?

566


What is the difference between Error, defect,fault, failure and mistake?

670


Is boolean a wrapper class in java?

616






What is nullpointerexception in java?

533


Why is core java important?

577


extending thread class or implementing runnable interface. Which is better? : Java thread

571


What is hashmap and map?

565


Can we override the static method?

582


Is a class an object?

586


How can we find the sum of two linked lists using stack in java?

580


What are the important features of Java 9 release?

546


Is arraylist zero based?

564


Write a java program for binary search?

615