Different syntaxes from C/C ++ and Java in Swift (1), swiftjava

Source: Internet
Author: User

Different syntaxes from C/C ++ and Java in Swift (1), swiftjava

--- Restore content start ---

Swift, as the IOS recommendation language officially launched by Apple, has received more and more attention over the past few years. Actually, programmers know that different programming languages are similar, the key to mastering a new language is to understand its different features from other languages, we will introduce the differences between C/C ++ and Java, which are commonly used in Swift syntax. If there is something wrong, I hope you can correct it.

I. Overall

In section 1, we will leave the general features of the Swift language:

1) ";" or ";" can be used for the end of a Swift program, but ";" is not used in Apple's official documents. Therefore, we recommend that you do not use "; "For example:

Let maxNum = 100

You do not need to add ";".

2) the Swift language uses not ASCII codes But Unicode encoding formats. Therefore, the declaration of variables can be Chinese or emoticon, for example

Let Southeast University = 100

Let

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.