--- Java training, Android training, IOS training, and. Net training. We look forward to communicating with you! ---
Differences between methods and functions
1. Method:
1. All object Methods start with minus sign-
2. Object method declaration must be written between @ interface @ end
3. The implementation of object methods must be written between @ implementation @ end
4. Object methods can only be called by objects
5. Object method category \ object all
6. Class methods all start with a plus sign +. Other rules and object methods are the same.
7. Class methods can be called either by class (Class Name) or by objects
2. functions:
1. functions belong to all files and have no relationship with objects. They can be written anywhere in the file (between @ interface and @ end cannot be written)
2. function calls do not depend on objects.
What is the difference between the 10-oc method and function of Blackhorse programmers?