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
What do you mean by aggregation?
Can we extend singleton class in java?
Can you start a thread twice in Java?
What is string and its types?
What are the advantages of functions?
Name four container classes.
What are constants?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What is the synonym of framework?
What is jvm? Why is java called the platform independent programming language?
What is an escape character in java?
Difference between string s= new string (); and string s = "abv";?
What is io stream in java?
Why are variables important in research?
Why do we need singleton?