Technical Discussion :: Java
Home > Technical Interview Q&A > Java > Discussion
8 / 66
What is Constructor? What is the purpose of default constructor? Does constructor return any value?
Answer:
Constructor are similar methods that are called when an instance of the class is created. The constructor doesn't explicitly returns a value but it does constructs something that as an instance can be used for that class.
Asked In ::
Varun Kumar Rai
23 Feb, 2019 5:07 AM
Constructor are similar methods that are called when an instance of the class is created. The constructor doesn't explicitly returns a value but it does constructs something that as an instance can be used for that class.