wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

What is the term used to describe the situation when a derived class provides a function already provided in the base class.

A
Overloading
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Overriding
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Polymorphism
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Encapsulation
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Overriding

Overriding used to describe the situation when a derived class provides a function already provided in the base class.

Function 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 super classes or parent classes.


If we inherit a class into the derived class and provide a definition for one of the base class’s function again inside the derived class, then that function is said to be overridden, and this mechanism is called function overriding.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Database Structuring
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon