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
What is the purpose of interface?
Explain an intermediate language?
What is functional interface in java?
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?????
How do you sort arraylist in descending order?
When throw keyword is used?
Write a factorial program using recursion in java?
Does java list allow null?
How you can force the garbage collection?
What is anti pattern in programming?
What is the difference between final, finally and finalize() in java?
Is it possible to instantiate the abstract class?
What is mean by encoding?
What is public static void main?
What is the purpose of java?