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
How do you declare a variable?
What is a container in a gui?
Is java a super set of javascript?
Is static a keyword in java?
What do you mean by flow of struts?
Why put method is used?
Can a static class have a constructor java?
What is hash table in java?
What are the various access specifiers in java?
What is a line separator in java?
What is the size of int?
Can an abstract class be a final class?
Why Java is not pure Object Oriented language?
What is polymorphism and what are the types of it?
Can one thread block the other thread?