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 is oops?what is its use in software engineering?
What is byval and byref? What are differences between them?
What are the 3 pillars of oop?
What does it mean when someone says I oop?
What are the three parts of a simple empty class?
What is object and class in oops?
Why it is called runtime polymorphism?
any one please tell me the purpose of operator overloading
Are polymorphisms mutations?
What does and I oop mean?
What is the real life example of polymorphism?
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?
How do you answer polymorphism?
what type of questions
What are the 4 main oop principles?