What's the difference between a method and a function?

前端 未结 30 4385
粉色の甜心
粉色の甜心 2020-11-21 05:08

Can someone provide a simple explanation of methods vs. functions in OOP context?

30条回答
  •  庸人自扰
    2020-11-21 05:49

    Function is the concept mainly belonging to Procedure oriented programming where a function is an an entity which can process data and returns you value

    Method is the concept of Object Oriented programming where a method is a member of a class which mostly does processing on the class members.

提交回复
热议问题