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

Answer Posted / sirisha

a constructor which is declared with private accesspecifer,
we can call it is private constructor,so that we can nt
create object from out side of the class, in this way we
can provide security to our class

Is This Answer Correct ?    39 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is array sorting in java?

548


What is double in java?

510


Is there any case when finally will not be executed?

521


Why is static used?

545


How do you execute a thread in java?

503






What all access modifiers are allowed for top class ?

709


What is java developer skills?

506


What is java life cycle?

533


What is treeset and treemap in java?

573


What are namespaces in java?

520


How can the checkbox class be used to create a radio button?

503


What is a nonetype?

559


How does map works in java?

507


What is regex in java?

525


What is the replace tool?

547