case class Person(firstName: String, lastName: String, age: Int) // Create an instance of the Person case class val person = Person("John", "Doe", 30) // Access properties directly (automatically generated getters) println(person.firstName) // Output: John // Case classes have a built-in toString method println(person.toString) // Output: Person(John, Doe, 30)