How do you define a local var/val in the primary constructor in Scala?

后端 未结 4 796
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 15:20

In Scala, a class\'s primary constructor has no explicit body, but is defined implicitly from the class body. How, then, does one distinguish between fields and local values

4条回答
提交回复
热议问题