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
Can we write any code after throw statement?
Define nashorn in java8.
Why is java architectural neutral?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
Is java util regex pattern thread safe?
How do you access command-line arguments within the code?
How to change the priority of thread or how to set the priority of thread?
Can a constructor be protected?
What are keywords in programming?
What is a super method?
Can we use string in switch case in java?
What is a linkedhashmap java?
Explain about object oriented programming and its features?
What is a default method?
Can an unreferenced object be referenced again?