Often a variable is only assigned to once and is used as an (immutable) definition.
通常对变量的赋值只有一次,并被当作不变的对象。
Scala allows you to decide whether a variable is immutable (read-only) or not (read-write) when you declare it.
当你声明一个变量的时候,Scala允许你来决定它是不变的(只读的)还是可变的(可读写的)。
An immutable "variable" is declared with the keyword val (think value object).
一个不变的“变量”可以用val关键字来声明(想象一个值对象)。
If the range variable is not an immutable type, the query will only ignore a query result if all members of the type match an existing query result.
如果范围变数并非不变的型别,则只有当型别的所有成员都符合现有的查询结果时,查询才会忽略查询结果。
If the range variable is not an immutable type, the query will only ignore a query result if all members of the type match an existing query result.
如果范围变数并非不变的型别,则只有当型别的所有成员都符合现有的查询结果时,查询才会忽略查询结果。
应用推荐