What is the process of defining a method in a subclass having some name and type signature as a method in its superclass?

asked Jul 20, 2021 in C# by (61.8k points)

The process of defining a method in a subclass having same name & type signature as a method in its superclass is known as?

(a) Method overloading

(b) Method overriding

(c) Method hiding

(d) None of the mentioned

The question was asked by my school principal while I was bunking the class.

The doubt is from Method Overriding in section Object Oriented Concepts of C#

1 Answer

asked Jul 24, 2021 in Java by Declan (98.3k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 24, 2021 in Java by Declan (98.3k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 24, 2021 in Java by Declan (98.3k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

asked Jul 20, 2021 in C# by cathy (61.8k points)

What is the process of defining a method in a subclass having some name and type signature as a method in its superclass?

...

What is the process of defining a method in a sub class having same name & type signature as a method in its superclass?

Explanation: When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass overrides the method in the superclass.

What is the process of defining a method in a subclass having same name and type signature Mcq?

2. What is the process of defining a method in a subclass having same name & type signature as a method in its superclass? Explanation: None.

What is the process of defining a method in terms of itself that is a method that calls itself?

Recursion is the process of defining something in terms of itself. It allows us to define method that calls itself repeatedly until it meets some base case condition.

Which of this keyword can be used in a subclass to call the constructor of superclass?

The super keyword refers to superclass (parent) objects. It is used to call superclass methods, and to access the superclass constructor.