Explain role of constructor in a java application?

Answer Posted / sonal

Without a constructor u cannot make an object or instance
of a class.
Every class must have a constructor. If no constructor is
provided the complier will provide default constructor at
run time.

Is This Answer Correct ?    33 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between include directive and include action?

538


Can private method static?

469


Difference between operator overloading and function overloading

604


extending thread class or implementing runnable interface. Which is better? : Java thread

559


What's the access scope of protected access specifier?

531






Can we use different return types for methods when overridden?

552


Is heap stored in ram?

518


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

754


how to deploy tomcatserver to weblogic server? write d following steps?

1442


What is e java?

552


What are the two environment variables that must be set in order to run any java programs?

521


What programs use java?

464


What is the difference between import java.util.date and java .util?

559


What type of language is java?

536


How many bits is a string?

521