What is the difference between the 10-oc method and function of Blackhorse programmers?

Source: Internet
Author: User

--- 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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.