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
How do you define a variable?
How to use arraylist in java netbeans?
Why is a string immutable?
What are the different conditional statements?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
What are the classes of java?
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
Is 0 true or is 1 true?
What is an argument java?
What methodology can be utilized to link to a database?
What is executor memory?
If a class is declared without any access modifiers, where can the class be accessed?
Where we write javascript code in html page?
Why map is used in java?
What is the difference between yielding and sleeping in java programming?