Scala supports associative mappings, such as a key-value pair that can be represented by (key, value)
All types in Scala are objects, including basic data types
The case statement in Scala is used to determine the received message, which is more than the switch...case in Java ... More focused
receive{Case msg = action ()}
The Scala action class implements the concurrency abstraction on top of threads, communicates with each other by sending messages, and each action class automatically maintains a message queue and implements the basic operations of sending and receiving messages.
Receriver! Msg
Scala is a static type, which requires that you determine the type of the parameter before compiling, similar to the parameterized type of C + +
Scala contains two types of variables, and the Val variable is equivalent to Const,var in Java, which is a regular variable
The basic data type in Scala comes from the class encapsulation of the corresponding data type in Java, the same as the string type
Scala has type inference, and can omit a type description if it can be inferred from the context, such as: val x = 4
Scala defines a function using the DEF keyword, which returns the last computed value of the function in the case of the default explicit return statement
Scala uses println direct output to standard output without System.out.println
The array index in Scala is args (0), not args[0 in Java]
The Scala array contains the method foreach (action), where action is an incoming function, for example: x = println (x)
Scala provides instruction: for (args <- args) println (ARG)
The difference between the Scala language and Java (1)