您的位置:首页 > 移动开发 > IOS开发

iOS 中函数和方法的区别

2015-07-08 22:08 155 查看

iOS 中函数和方法的区别 (function method)

主要两种认识:



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.

很多人支持这种说法,就是方法是对象的,而函数是独立于对象的

Objective-C是类似C++的



函数和方法并没有区别只是叫法不一样

[引用]http://stackoverflow.com/questions/155609/difference-between-a-method-and-a-function

[引用]http://bbs.itheima.com/thread-138029-1-1.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: