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 are the 8 primitive data types in java?
Can java arraylist hold different types?
what is difference between equals and ==?
How big is a boolean?
Differece between class and generic class?
Explain super keyword in java.
What is difference between string and stringbuffer?
How many ways can we create singleton class?
In a class implementing an interface, can we change the value of any variable defined in the interface?
What is the main functionality of the remote reference layer?
Define linked list and its features with signature?
What is collection sort in java?
What is meant by object?
Explain the scope of a variable.
What is the super void?