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

Name some useful annotations introduced in Struts2?

714


How do you find the struts version being used in a project?

703


What is the use of struts config xml file?

651


What are the two types of validations supported by validator framework?

768


Which design pattern is implemented by Struts2 interceptors?

747


How we can configured action mapping in struts?

744


How struts2 supports internationalization?

871


How the flow of various requests happens in struts application?

733


What do you mean by actionmapping?

727


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

771


How many struts config file can be created in struts?

650


What is the difference between empty default namespace and root namespace?

775


How do I install struts?

771


What is the purpose of @results?

757


Does Struts2 action and interceptors are thread safe?

757