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 benefits of polymorphism?
What is encapsulation c#?
What exactly is polymorphism?
How does polymorphism work?
What are functions in oop?
Why do while loop is used?
Is react oop?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is destructor example?
What does enum stand for?
What is the types of inheritance?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
What are the benefits of interface?
What is stream in oop?
What is abstraction example?