函数和方法的区别

来源:互联网 发布:奇门择日软件 编辑:程序博客网 时间:2024/05/18 11:40

A method is on an object.
A function is independent of an object.

For Java, there are only methods.
For C, there are only functions.
For C++ it would depend on whether or not you’re in a class.

简单易懂,来自http://stackoverflow.com/a/155633/6781462

0 0
原创粉丝点击