阅读(4519) (0)

Scala 注释

2017-01-09 15:21:31 更新

Scala注释很像Java和C ++注释。

多行注释以/*开头,以*/结束。

/*
    This is a multiline comment:
*/

单行注释用//开头,并继续到行尾:

// This is a single line comment

在Scala中,我们可以嵌套多行注释:

/*
This is an outer comment
/* And this comment
is nested
*/
Outer comment
*/