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
Should you use singleton pattern?
Can we use this () and super () in a method?
What is hash table in java?
What is a locale?
Discuss different types of errors that generally occur while programming.
please send me hr interview questions in it industry
What is an inner class in java?
What is polymorphism java example?
What checkbox method allows you to tell if a checkbox is checked?
How many bytes is double?
Is special character in java?
Can java inner class be static?
How to perform bubble sort in java?
Is static variable stored in heap?
What is method overloading in JAVA? Why is it not present in C ?