Which of the below options are wrong about overriding?
you can't override private methods of base class
if you have same static method with same name, same signature in base and derived class it is also called as overriding.
you can't override final methods of base class.
to tell a function is overriding or not, it should have same signature and return type as in base class.
overriding is applicable only for instance methods. if you have same instance method in base class and derived class with same name, same signature, same return type, then it is called as overriding. static methods are not counted as overriding. Note: 1. you can't override final methods, and private methods.
Back To Top