1.

To override a method in Java, we need to define a method in sub class with the

A. same name, same number of arguments having the same data types as a method in the super class
B. different name, same number of arguments having the same data type as a method in the super class
C. same name but different number of arguments as a method in the super class
D. same name, same number of arguments but different data types as a method in the super class
Answer» B. different name, same number of arguments having the same data type as a method in the super class


Discussion

No Comment Found