what is private constructor?what are the uses of writing
private constructor in our program?
Answer Posted / neha
we can not create instance of object with new operator.if u
do not want the class to be inherited then we declare the
construtor as private when we used Private Construtor
Static metods are used this construtor are also used for
creating singleton object
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is use of set in java?
What are advantages of using Java?s layout managers than windowing systems?
what is a thread pool in java and why is it used?
What is a values collection view ?
Difference between character constant and string constant in java ?
Can we have multiple classes in single file ?
What are inbuilt functions in java?
Explain an intermediate language?
Can you explain the final method modifier?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
Explain jvm, jre, and jdk?
What is the effect of keeping a constructor private?
What is a generic data type?
What is an abstract method in java programming?
explain copyonwritearraylist and when do we use copyonwritearraylist?