Constructor
Please suggest me few project level examples related to the static constructor and non static constructor where can we use properly ?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Nilesh JadavRank #109 · 20.3K reputationPosted May 28, 2015, 4:39 AM EDT
A constructor is a special type of method that is invoked when you create a new instance of a class .A constructor is used to initialize the members of a class. The name of a constructor in the same as the name of the class that contains it.
Constructor Need in application : - To initialize member variables, a function can be invoked as soon as an object is created.