Scala automatically generates getter-setter methods for each field defined in a class after compilation. If there is a field as,
value:Int the getter-setter methods for this field would be,  def value:Int = this.value // Getter
def value_= (value:Int) = this.value = value // Setter These methods are public for a public field whereas those are private for a private one. However, the developer may create such public methods for a private field. Also, they may declare getter-setter of a different pattern, like getXXX and setXXX .