0

what are the differences between constructor and method??

16th Oct 2016, 7:50 AM
Sonnet Saif
Sonnet Saif - avatar
2 odpowiedzi
+ 1
the constructor can to initialize a object, the methods are basically actions
16th Oct 2016, 9:41 AM
Wanderlei Borges
Wanderlei Borges - avatar
+ 1
A constructor is a function to create and initialize an object. A method is a function belonging to the object. If you have an object called obj and want to call its met() method, you use obj.met().
16th Oct 2016, 10:54 AM
Zen
Zen - avatar