what is the use of declaring constructor as private?
Answer Posted / ranganathkini
By declaring the class constructor as private, other classes
cannot create instances of the class.
This design is usually used in singleton patterns.
Is This Answer Correct ? | 22 Yes | 2 No |
Post New Answer View All Answers
What is join () in java?
Is there any tag in htm to upload and download files?
I want to store more than 10 objects in a remote server? Which methodology will follow?
What are the main uses of the super keyword?
Is array size fixed in java?
How can you say java is object oriented?
What is the difference between jfc & wfc?
What is the memory leak in java?
What is internal variable?
What do you mean by an interface in java?
What are the restrictions that are applied to the java static methods?
What is udp in java?
Tell me about your ability to work under pressure
Give some features of interface?
What is command line used for?