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
How do you replace a string in java?
What is member in java?
How to instantiate static nested classes in java?
How do you reverse a list?
Where is java located?
What are the different types of garbage collectors in java?
How java enabled high performance?
Is java owned by oracle?
Can a class be final?
what is heap memory?
What an i/o filter in java programming?
What is stream api in java8?
What is final class?
What is java used for on a computer?
What is the difference between dom and sax parser in java?