Can we have a private constructor ?

Answer Posted / prabha govind

yes
and if a constructor is made private/protected...then that
class cannot be inherited

Is This Answer Correct ?    116 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is constructor in oop?

583


What is encapsulation in ict?

599


What is oops and its features?

580


What is polymorphism what are the different types of polymorphism?

558


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3550






Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3820


How many human genes are polymorphic?

568


What do you mean by overloading?

576


What are the 4 pillars of oop?

666


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2098


What is polymorphism and types?

595


Is enum a class?

602


What is abstraction in oops?

578


What is overloading in oop?

572


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2003