what is private constructor?what are the uses of writing
private constructor in our program?
Answer Posted / sirisha
a constructor which is declared with private accesspecifer,
we can call it is private constructor,so that we can nt
create object from out side of the class, in this way we
can provide security to our class
| Is This Answer Correct ? | 39 Yes | 8 No |
Post New Answer View All Answers
What is java and why do we need it? Explain
Can we make constructors static?
How do you allocate memory to object?
What do you mean by global variable?
What is byte value?
What is ascii format?
What is variable and example?
How do you escape in java?
Is java programming easy?
What is implicit object in java?
Will set allow duplicates in java?
What is object of class in java?
What is the purpose of the enableevents() method?
Explain scope or life time of local variables in java?
What is __ init __ functions?