what is the use of private constructor in core java?

Answer Posted / rajib

Whenever we r using singleton class then we use constructor
as private.

Is This Answer Correct ?    38 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to persist data of objects for later use. What is the best approach to do so?

587


Why do we need strings in java?

518


What is floor math?

509


Mention a package that is used for linked list class in java.

520


What are the two types of java?

512






What is a short in java?

494


What is hash table in java?

488


Define "Access specifiers" in java.

606


What is unicode full form?

546


Why does java doesnt suuport unsigned values?

1789


Whats the difference between notify() and notifyall()?

564


Which of the following classes will have more memory allocated?

577


What is the escape character in java?

505


How do you allocate memory to object?

511


What is identifier with example?

564