OC Weak syntax

Source: Internet
Author: User

OC is in the process of running to detect whether the object does not implement the corresponding method, all the compilation process only give a warning: may not find the corresponding method;

If the program goes wrong during the run, the program will flash; class method: a method that a class can call directly, equivalent to a static method in Java, but a class method can only be called by a class, and an object cannot invoke a method that begins with a class method, an object Method: 1, beginning with '-' 2, can only be called by the object 3, the object method can only call the current object instance variable or member variable class method: 1, start with ' + ' 2, can only be called by the Class 3, class method cannot call instance variable or member variable can allow class method and object method with the same name the advantages and applications of the class method: 1, do not depend on the object, the execution efficiency is 2, can use the class method to use the class Method 3, as long as the method does not need to call the member variable, then the method can be changed the class method self in the object method to represent the pointer to the current object (who called the current method, Self on behalf of WHO), equivalent to Java thisself appear in the object method, representing the current object self appears in the class method, representing the current class self-> member variable [self method name], you can call the current object method or class method

OC Weak syntax

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.