How would you stop a class from class from being derived or
inherited.

Answer Posted / bala

Final will do in Java. But not in C++.

I hope, bye creating all the constructor,copy constructor
in private will stop inherite the class.
Plz refer 'Singleton Pattern'

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are oops methods?

568


What is the diamond problem in inheritance?

579


What is persistence in oop?

673


What is encapsulation oop?

576


What are the advantages of polymorphism?

577






Why do we use polymorphism in oops?

581


What is the types of inheritance?

604


Prepare me a program for the animation of train

2000


What do you mean by variable?

577


What is pointer in oop?

535


What is encapsulation in oop?

606


How to call a non virtual function in the derived class by using base class pointer

5263


Which language is not a true object oriented programming language?

642


What is the difference between abstraction and polymorphism?

617


What is pure oop?

597