Can we have a private virtual method ?

Answer Posted / edward

yes... we can have private virtual method and will not give
any compile time/runtime error. but there is no use of it.
we could not call the method from out side of the class

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an example of genetic polymorphism?

647


What are the components of marker interface?

600


What is the diamond problem in inheritance?

577


What is inheritance and how many types of inheritance?

616


What is the importance of oop?

608






What is the example of polymorphism?

554


what is difference between class template and template class?

2157


Why do we use encapsulation in oops?

518


What is oops in programming?

563


What is class encapsulation?

588


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1403


Why multiple inheritance is not allowed?

581


What is abstraction in oops?

584


What is abstraction example?

619


What is destructor oops?

619