Http://www.cocoachina.com/macdev/objc/2011/0124/2602.html
In the class implementation of objective-C, we often see the two keywords "self" and "super". Taking the previous OOP language experience as an example, C ++ assumes that self is equivalent to this, super is equivalent to calling the parent class method, which seems easy to understand. The following code is used as an example:
@ Interface person: ns
Document directory
Truth
One more step
Furthor more
In the class implementation of objc, we often see the two keywords "self" and "super". Taking the previous oop language experience as an example, take c ++. self is equivalent to this, super is equivalent to calling the parent class method, which seems easy to understand.
The following code is used as an example:?
1234567891011121314151617
InJava has two very special variables: this and super, which do not need to be declared before use. This variable is used inside a member function and points to the current object. The current object refers to the object that calls the method currently being executed. A super variable is a constructor that directly points to a super class and is used to reference
We all know that this and super call constructors must be placed in the first sentence, and today the classmate asked me a question of a little meaning.So: How do I explicitly initialize a parent class with super in a subclass and initialize the subclass with this? -------------------------------------------------------------------------------------First of all, we must realize that two points:1. The
* SUPER () and this () are similar, except that super () calls the constructor of the parent class from the subclass, and this () calls other methods within the same class.4. The similarities and differences between Super and this:1) Super (parameter): Call one of the constructors in the base class (should be the first
Http://www.cocoachina.com/macdev/objc/2011/0124/2602.html
In the class implementation of objective-C, we often see the two keywords "self" and "super". Taking the previous OOP language experience as an example, C ++ assumes that self is equivalent to this, super is equivalent to calling the parent class method, which seems easy to understand. BelowCodeFor example:
@ Interface person: nsobject {Nsstring
Recently there are students in the use of Phpwamp, asked me the role of Super body mode.Students asked: "Teacher, Phpwamp inside the Super body mode is what meaning, what is the use?" Answer: The 、、、 is when I released the beta version, the mode switch inside the single dog mode. Student: Single dog? I mean, I didn't use the beta, did I 、、、、Before the release of the official version of PHPWAMP8.1.8.8, I hav
While looking at the Python Advanced Programming book, when it comes to super, there's some confusion about how super's usage in Python is different from other languages, finding some information on the web and finding that basically few articles can make my doubts clear, One of the most valuable things about this article is that it explains how we use the super right way.First look at a program:classA:def
What is the difference between super () and this ()? This () invokes the parameterless constructor of the current object, and super () calls the parameterless constructor of the parent class1) Super (parameter): Call one of the constructors in the base class (should be the first statement in the constructor)2) This (parameter): Invokes another form of the constru
Folder Encryption Super Master has a faster and stronger file, folder encryption function, through the encrypted file or folder can not be unlocked through the password and can not be deleted.
Folder Encryption Super Master
Folder Encryption Super Master's use of the method is very simple, for the folder you want to encrypt the right button will appear "En
The principle of Super VLAN aggregation, which is no longer difficult to understand, is also mainly used in the network of service providers to solve the shortage of IPv4 address resources. A Super VLAN is also known as VLAN Aggregation. The principle is to set a Super VLAN and multiple Sub VLANs (subvlans) association (similar to the Isolate-user-VLAN mentioned
PHP has built in some super global variables that we can use and visible anywhere in the script, and we'll take a look at these global variables:1, $_serverThe $_server Super global variable contains information created by the Web server that provides information about the server and client configuration and the current request environment. Depending on the server, the variable value and the number of varia
Today met a demand, customer registration page customized a super long registration notice, a lot of content. But the style is relatively nice to do.The content of the registration notice is made using multiple message stitching.Boss said Rawtext support HTML style, so I think of three solutions:1. Put the messagetextinput inside the messagecompaonentlayout, and then disabled it out, Messagecompaonentlayout set the width to 80%.2. Put Messagestyledtex
How can I design a super administrator with user permissions? When developing a member management system, you want to have the permissions of a super administrator to perform any operations without knowing how to distinguish it from other users. now you want to make the program accessible by default as a super administrator, then other users can judge based on th
Source: http://zhangjunhd.blog.51cto.com/113473/20531/1. What is super? What is this? the Super keyword denotes the meaning of the super (parent) class. The This variable represents the object itself. 2. call the constructor using superthis classperson { Public Static voidPRT (String s) {System. out. println (s); } person () {PRT("A person."); } person (String
Super has the following two major functions:1. Qualifying : force access to members of the parent class (Field, method)2. Call function : Specify/Display a constructor that invokes the parent classSuper Call rule:1, the subclass constructor will always call the parent class constructor once , by default, the class constructor automatically calls the parent class without parameters of the constructor ;2, if you want to explicitly specify which construc
Xrange Module
Use range uniformly, and add__contains__
Raising exceptions/handling Exceptions
Raise and AS Keywords
Next () function
Keep only next() , .next() throw property exceptions
For loop
forLoop variables no longer cause namespace leaks
Compare non-sortable types
Python does not support different types of comparisons
Enter input
Only input is allowed and Raw_input is c
In China 3G on the eve of the horse, mobile im seems to be the most popular mobile value-added services, may be due to see the success of Tencent it. In the second half of 2006, China Mobile launched a flying letter business, and before this, to Pica-led mobile IM software also swept the domestic mobile phone users. Today, China Unicom also launched its own mobile IM Software-Super letter. China Unicom's friends must be very concerned about it, this i
In "multiply, divide the article" mentioned a kind of special multiplication--square. The reason for this is that the two multiplied numbers are the same, and when each bit is traversed, you actually know the two-digit information.In fact, the complexity of the need O (n^2) is because of the need to embed two layers of the loop to come out two of the total information, so if you need to traverse only once to get the information, then the processing since the square can reach the O (N^2/4) level.
An SVN article on the use of idea under Mac--there's a graph super detailBlog Category:
Idea SVN
Remember that the SVN use of idea has a graph super detail based on the experience of using SVN in eclipse to think about the thought, the use of the SVN method is recorded as follows mainly divided into several functions to introduce the first function of course is to pull the remote SVN code to ou
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.