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 are Hostile Applets?

1602


Write a program to print count of empty strings in java 8?

536


Which browsers work with java?

559


Write the algorithm to check the number non-leaf nodes in a tree.

589


What’s the difference between callable and runnable?

543






What is Garbage Collection in Java

609


How do you find the absolute value?

559


How to display all the prime numbers between 1 and 100

503


What is complexity in java?

525


What is the use of 'super' keyword inside a constructor?

560


What is a priority queue java?

523


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

702


What is variable argument in java?

557


Explain numeric promotion?

598


What is the importance of finally block in exception handling?

539