Some of the language features of Scala

Source: Internet
Author: User

1. All the basic data types are objects, such as the value 1 of the said class is Scala. Int

2. All operators are class member methods, such as 1+2 call 1.+ (2); 0 to 2 call 0.to (2)

3. Access to the array is also via function calls, Array (3)

4. Val,var defines the const reference and the ordinary reference, and the const is the logic

5. There are better types of derivation, eliminating a large number of types of writing

6. The method is supported by any object, this method returns a tuple that contains two objects before and after

7. Create objects from the Factory mode, eliminating the call to new, such as a = List (1, 2)

Some of the language features of Scala

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.