Difference

label Programming
account_circle Unassigned
schedule 3 Days
account_balance_wallet $5

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
Oct 19th, 2017
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