difference been constructor and function
Answers
Answered by
1
constructor-
1)has a name same as that of the class name.
2)does not have a return type.
3)Can be invoked implicitly at the time of object creation(default constructor).
function-
1)has a name different from that of the class name.
2)have a return type.
3)cannot be invoked implicitly. it has to be invoked only explicitly.
1)has a name same as that of the class name.
2)does not have a return type.
3)Can be invoked implicitly at the time of object creation(default constructor).
function-
1)has a name different from that of the class name.
2)have a return type.
3)cannot be invoked implicitly. it has to be invoked only explicitly.
ahmedpumpwala:
thanks a lot
Similar questions