what happen if the private constructor is written in a claass

Answer Posted / ravi kumar

If we write the private constructor, it is not possible to
create the object for the class. If we want to create the
object for the class, we need to write the default
constructor, which is a public one.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is struts 1 still supported?

594


What types of validations are available in xml based validation in struts2?

649


Are interceptors thread safe?

664


What are disadvantages of Struts?

635


What is the purpose of '@keyproperty'?

669






How duplicate form submission can be controlled in struts?

743


Explain about struts dispatch action?

642


How is forward action used for integration?

651


Why are springs better than struts?

704


In which order struts framework searches for a message bundle?

639


Can we have multiple struts config files in a single web app?

583


What is the purpose of struct-config.xml in struct2?

646


What is the need of struts?

649


What is the differences between struts1 and struts2?

608


What are the differences between http direct and http indirect?

552