home
/
developersection
/
interviews
/
what are the rules (method access permission and exception) that needs to be followed, during method overloading and overriding ?
During method Overloading, method name should remain same. But method signature can vary. Components of signature that can vary are:
1.Number of arguments
2.Datatype of arguments
3.Order of arguments
During method Overriding, make sure that the method is not throwing checked exceptions that are new or higher than those declared by the overridden method.But we can't override Static and Final methods.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers