what is the purpose of method overriding in java where v r
completely re-defining a inherited method instead y can't v
create a new method and define.If the question is very silly
plz excuse me and do reply.Thank U!

Answer Posted / ershad md sk

Bcoz......wen we think in Object Oriented Lang ..has u ask
if we create a new method we hav to call the method each
time wen we invoke the Object & it is a performance ISSUE
it wil eat lot of memory & it is a COMPLEXITY
Issue ........if u override Using the superclass Handle we
can create any instance which is of any type(int Float
Long Short)it wil save space and reduce COMPLEXITY and
increase PERFORMANCE...

Is This Answer Correct ?    10 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is consumer in java?

525


What is finally and finalize in java?

594


Can a class be final?

500


What is downcasting?

576


Why is java called the platform independent programming language?

578






What is hotjava?

559


What is thread pool in java with example?

547


For class CFoo { }; what default methods will the compiler generate for you>?

620


What are predicates in java 8?

533


Where is the find and replace?

534


Is main a function?

516


What do you understand by java virtual machine?

709


Why we use methods in java?

540


What is the difference between import java.util.date and java .util?

570


Is the milky way in a void?

540