4
class Foo(bar: String) {
import Foo.Bar
def this() = this(Bar) // this line fails, it seems I can only do
// def this() = this(Foo.Bar)
}
object Foo {
val Bar = "Hello Bar"
}
基本上,我怎麼使用Bar
我import Foo.Bar
後,我真的要叫Foo.Bar
每一次?斯卡拉最終靜態變量