SCALA的技巧
在命令行界面,输入函数名称,然后点击TAB,可以出现可选的所有函数名称,如:
SCALA的常量和变量
常量用
val命名,赋值后不能更改,如:
如果更改,会报reassignment to val错误
变量用var 命名,赋值后可以更改,如:
注意:
scala的变量类型放在名称后面,如
test:String
test:String
scala导入包的方式,后面用的是_,如
import scala.math._
题目,求3的平方根,再平方,看有什么差别:
Base36编码
Base36
is a
binary-to-text encoding
scheme that represents
binary data
in an
ASCII
string format by translating it into a
radix
-36 representation. The choice of 36 is convenient in that the digits can be represented using the
Arabic numerals
0–9 and the
Latin letters
A–Z
[1]
(the
ISO basic Latin alphabet
).
BASE36编码是一种二进制到文本的编码方案。