What is a difference between a method and a function?

后端 未结 7 1490
礼貌的吻别
礼貌的吻别 2020-12-08 00:15

What is the difference between a method and a function? Is it that a method returns a value and a function doesn\'t?

7条回答
  •  渐次进展
    2020-12-08 00:50

    Function is a generic term to be used in procedural programming approach where as Method is a term to be used in Object oriented programming approach to define a class property.

提交回复
热议问题