What restrictions are placed on method overloading and
method overriding?

Answer Posted / muthusenthil

Restriction imposed on Method Overloading are
a) should done with in a same class.
b) it should have same name of overloading method.
c) its arguments or parameter should be different
irrespective of return type.

Restriction imposed on Method Overriding are
a) should done with its derived class
b) should have same name of parent method and arguments
too.

Is This Answer Correct ?    34 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of interface?

583


Explain an intermediate language?

508


What is functional interface in java?

515


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

1801


How do you sort arraylist in descending order?

576






When throw keyword is used?

591


Write a factorial program using recursion in java?

517


Does java list allow null?

546


How you can force the garbage collection?

538


What is anti pattern in programming?

500


What is the difference between final, finally and finalize() in java?

520


Is it possible to instantiate the abstract class?

540


What is mean by encoding?

627


What is public static void main?

568


What is the purpose of java?

558