Objective-c Knowledge Point

Source: Internet
Author: User

So what are the drawbacks of categories compared to inheritance? A class cannot declare a new member variable, and once you define a party
Method is the same as the method name in the original class, the original method will be hidden because it is not an inheritance structure and you cannot
The methods in the category use super to activate the same name method as the original class.

@interface equivalent to the prototype of a class of objective-c, which is different from the interface meaning in Java,
The @protocol in Objective-c is what is equivalent to the interface in Java. For example: The inheritance of OBJECTIVE-C Also
is a single inheritance, only one parent class is allowed, but @protocol is allowed to inherit multiple (according to Objective-c's argument called
Doing a class that conforms to protocol A, protocol B, not inheritance, is consistent with the Java interface.

-(BOOL) Conformstoprotocol: (protocol*) prot used to determine whether an object conforms to a
A protocol.

JAVA uses a GC mechanism to automatically manage memory, OBJECTIVE-C supports manual memory management, and also supports GC mechanisms, but
The GC mechanism is not valid for iOS devices, that is, only for Mac OS X computers. This is reasonable because the iphone, IPod,
The memory and CPU of the iPad are certainly much lower than the computer, and you must be cautious about the use of memory, not unscrupulous
Wait for the GC to help you clean up the mess.

New is the Alloc and init form of writing, which is [[Fraction alloc]
INIT] is the same as [fraction new]


Session session= Gets the JDBC Connection object for Hibernate
for (int i=0;i<excel number of rows; i++) {
Object obj= The corresponding Java object for each row of Excel records;
Session.save (obj);
if (i%1000==0) {
Session.flush ();
}
}
Transaction.commit ();
We see every 1000 times

Nsdictionary is used to store the data structure of the key-value, similar to the map in Java.

Objective-c Knowledge Point

Related Article

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.