1 _=
setters:以_=接在getter的identifier后,并紧跟参数
def y_= (newValue: Int): Unit = { if (newValue < bound) _y = newValue else printWarning }
时间: 2024-08-11 05:32:14
1 _=
setters:以_=接在getter的identifier后,并紧跟参数
def y_= (newValue: Int): Unit = { if (newValue < bound) _y = newValue else printWarning }