what is the use of declaring constructor as private?
Answer Posted / ranganathkini
By making all the constructors of a class private, you can
also prevent other class from extending the class without
marking the class final.
Is This Answer Correct ? | 9 Yes | 6 No |
Post New Answer View All Answers
Which is dependent variable?
What is difference between hashset and hashmap in java?
What is difference between null and void?
How do you compare two strings lexicographically?
Can a class be declared as static?
If you are given the name of the function at run time how will you invoke the function?
How do you sort a string in java?
Explain the difference between abstract class and interface in java?
What is the difference between stringbuffer and stringbuilder class?
How will you add panel to a frame?
explain multi-threading in java?
Write a program based on Java script program.
What is a singleton factory?
What is the use of http-tunneling in rmi?
What is difference between == and === in js?