what is private constructor?what are the uses of writing
private constructor in our program?

Answer Posted / amit

Private constructor can be used to make a pure static
class, using it we can create only one instance of class at
the loading time.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can any body body expalin best definitions & best real time exaples for opps concepts.

2034


Why is it important to initialize a variable?

724


What is the difference between iterator and enumeration ?

725


What is ascii format?

748


What are the types of casting?

808


What is singleton service?

703


Define the term string pool?

777


What is type parameter in java?

712


What is the nested interface?

787


Justify your answer that you can't define a method inside another method in java, if you can then how?

795


how does the run() method in runnable work? : Java thread

686


What happens to the Exception object after handling an exception?

2069


How do you read and print a string in java?

717


Do I need java for windows 10?

752


Is java pass by value or pass by reference?

734