Difference

Programming
Tutor: None Selected Time limit: 3 Days

What is the difference between constructor and method in OOP?

Nov 30th, -0001

A constructor has no explicit return type,It is not implicitly inherited and it usually has different rules for scope modifiers.
Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.
Constructor name should match with that of class
Jul 22nd, 2013

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Nov 30th, -0001
...
Nov 30th, -0001
Dec 4th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer