Programming - Inheritance - Discussion

You Are Here :: Home > JAVA > Inheritance - Discussion

 



Q.

What restrictions are placed on method overriding?                         


A. Overridden methods must have the same name , argument list , and return type. The overriding method may not limit the access of the method it overridees.The overriding method may not throw any exceptions that may not be thrown by the overridden method. B. Overridden methods must have the different name , argument list , and return type. The overriding method may not limit the access of the method it overridees.The overriding method may not throw any exceptions that may not be thrown by the overridden method.
C. Overridden methods must have the same name , argument list , and return type. The overriding method may not limit the access of the method it overloads.The overriding method may not throw any exceptions that may not be thrown by the overridden method. D. Overridden methods must have the different name , argument list , and return type. The overriding method may not limit the access of the method it overloads.The overriding method may not throw any exceptions that may not be thrown by the overridden method.

Answer: Option A
Explaination:

 


No Explanation




Discussion

Your Comments Goes here...
NameDiscussion