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
Why do we need data structure in java?
What is the program compilation process?
What does += mean in java?
Why Java is not pure Object Oriented language?
What restrictions are placed on method overriding?
Is string a data type in java?
What is the maximum size of array in java?
What are accessor methods in java?
Which sorting is best in java?
What are thread priorities and importance of thread priorities in java?
How we create object in copy constructor?
What data type is a string?
Why generics are used in java?
Can classes declared using the abstract keyword cab be instantiated?
Are global variables initialized to zero?