Can we have a private constructor ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ravi`
no,
we can not make a constructor private , if we make a
constructor private its method cannot access in main method .
| Is This Answer Correct ? | 17 Yes | 136 No |
What is the significance of classes in oop?
What is the example of polymorphism?
sir i want to know which posting to apply since i am BE CSE.. also want to know what are the rounds there for my interview...Expecting for ur valuable answer....
Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}
What is the difference between a mixin and inheritance?
write knight tour problem which is present in datastructure
What do we mean by a hidden argument in a function?
What is the real life example of polymorphism?
What is polymorphism oop?
program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number
What is multiple inheritance?
What are the advantages of inheritance?
26 Answers IBS, TCS,