Differences between objective-C and Java (1)

Source: Internet
Author: User

Note: What I'm talking about is the difference between objective-C and Java. In the same place, I just want Java developers to quickly master and understand objective-C.

 

Objective-C is different from Java:

1. Pay attention to the memory released after use. [Avariable realase] releases memory

2. scalar Note: unsigned, Int, bool, nsinteger, nsuinteger, the string is specified.

3. const is similar to final in Java

4. struct: struct

5. typedef Type Definition

6. pointer (rarely used in obj-c), but we need to pay attention to the. pointer memory address and pointer operation. We only need to use the pointer as an object and understand it. There is no need to go into depth.

7. Use long int to save the value so that the data will become larger soon...

8. Implementation of interfaces and interfaces: The interface extension is. h, and the source file is. C.

9. Note that the usage of the enhanced for loop is different: Fast enumeration...

You can make a calculator...

 

Not complete...

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.