Scala Language Simple Class


Example

class Person(val firstName: String, val lastName: String) {
  def fullName(): String =
    s"$firstName $lastName"
}