返回语句在Scala中是可选的。
最后要注意没有返回语句。
在这些情况下,脚本以值或返回语句结束。
In these cases, the script ends with a value or a return statement.
There's no return statement.
这里没有返回语句。
All right? So if I called sqrt alone, that return test value is done, but in this case I bound it to test, so I can go look at test, and there it is.
执行完返回值语句,但是在这里我将把它赋值给,所以当我看test的值的时候就是返回的值。
应用推荐