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