摘要:
在scala中使用 return 的话,编译的时候会提示the latest statement is method is automatically returned, use of th return keyword is redundant. 这个警告是说最后一个语句的结果会自动返回,不需要使 阅读全文
摘要:
Scala 提供了三种创新的字符串插值方法:s,f和raw,使用他们我们可以方便快捷的组合字符串。 s 字符串插值器 在任何字符串前加上s,就可以直接在串中使用变量了,在生成字符串的时候会隐式调用其toString方法。 class Complex(val real: Double, val ima 阅读全文