Top "Overriding" questions

Method overriding, in object oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes.

Python: multiplication override

So, I've got a custom class that has a __mul__ function which works with ints. However, in my program (in …

python overriding operator-keyword
How do Java method annotations work in conjunction with method overriding?

I have a parent class Parent and a child class Child, defined thus: class Parent { @MyAnnotation("hello") void foo() { // implementation …

java inheritance annotations overriding
Unable to override onCreateOptionsMenu in ListFragment

I created an app that supports both phone and tablet version so i use the android-support-v4.jar library. My activity …

android overriding compatibility fragment
Override a member function with different return type

Consider the example below: #include <iostream> using namespace std; class base { public: virtual int func() { cout << "…

c++ virtual-functions overriding redefinition
Override WooCommerce Frontend Javascript

Can someone guide me as to what is the proper method of overriding WooCommerce core Javascript files, specifically frontend files. …

javascript wordpress overriding woocommerce
Is there any way in C# to override a class method with an extension method?

There have been occasions where I would want to override a method in a class with an extension method. Is …

c# extension-methods overriding
Overriding referenced style attributes

After reading through References To Theme Attributes I am trying to reference the value of an attribute in the my …

android styles themes overriding checkedtextview
Overriding Equals method in Structs

I've looked for overriding guidelines for structs, but all I can find is for classes. At first I thought I …

c# struct equals overriding
Can't Override onPostExecute() method in AsyncTask Class or get it to trigger

I am having trouble getting the onPostExecute() method to call when running an AsyncTask. When I try to set up …

java android methods overriding android-asynctask
Why can't I access C# protected members except like this?

This code: abstract class C { protected abstract void F(D d); } class D : C { protected override void F(D d) { } …

c# overriding protected access-modifiers