Can we have a private constructor ?

Answer Posted / arpitha

no, its of no use having a private constructor,,, bcoz
declaring constructor as private makes it blocked.

Is This Answer Correct ?    6 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the fundamental idea of oop?

640


What exactly is polymorphism?

612


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

635


What is encapsulation oop?

581


What is abstract class in oop?

538






What is polymorphism oop?

625


What is the renewal class?

2171


How do you achieve runtime polymorphism?

573


Why do we use inheritance?

630


2. Give the different notations for the class.\

1594


Why is object oriented programming so hard?

616


What is oops?what is its use in software engineering?

561


What is the example of polymorphism?

562


What are the 4 pillars of oop?

674


What is a class oop?

594