0
what are the differences between constructor and method??
2 Antworten
+ 1
the constructor can to initialize a object, the methods are basically actions
+ 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().