Object-oriented programming (OOPs) Question:

In which cases you use override and new base?

Tweet Share WhatsApp

Answer:

Use the new modifier to explicitly hide a member inherited from a base class. To hide an inherited member, declare it in the derived class using the same name, and modify it with the new modifier.

Download OOP PDF Read All 37 OOP Questions
Previous QuestionNext Question
What is a private constructor? Where will you use it?Can we call a base class method without creating instance?