Free excerpt from TypeSafe (pdf): Scala for the Impatient
I discovered the special syntax for a field setter:
class Person {
private var privateAge = 0 // Make private and rename
def age = privateAge
def age_ = (newValue: Int) {
Free excerpt from TypeSafe (pdf): Scala for the Impatient
I discovered the special syntax for a field setter:
class Person {
private var privateAge = 0 // Make private and rename
def age = privateAge
def age_ = (newValue: Int) {