Can we have a private constructor ?
Answer Posted / namrata ahuja
no. constructors are always declared publicly. they are used
to initialize data members of a class. they are
automatically invoked by a class object declaration so if it
is private it cannot be invoked.
| Is This Answer Correct ? | 6 Yes | 39 No |
Post New Answer View All Answers
What are the 5 oop principles?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
Is enum a class?
what are the different types of qualifier in java?
What are functions in oop?
What is encapsulation and abstraction? How are they implemented in C++?
What is abstract class in oop?
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?
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is the point of oop?
What is difference between data abstraction and encapsulation?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is polymorphism and types?
What is abstraction in oops?
What is object-oriented programming? Webopedia definition