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 array sorting in java?
What is double in java?
Is there any case when finally will not be executed?
Why is static used?
How do you execute a thread in java?
What all access modifiers are allowed for top class ?
What is java developer skills?
What is java life cycle?
What is treeset and treemap in java?
What are namespaces in java?
How can the checkbox class be used to create a radio button?
What is a nonetype?
How does map works in java?
What is regex in java?
What is the replace tool?