Demetrious Robinson04/26/2019, 9:59 PM
data class Person(val firstName: String ="Demetrious", val lastName:String = "Robinson")
val person1 = Person()
I don't see the use of that as it only returns the value and not the property name. Wouldn't it be simpler to just write
println(person1.component1()) // "Demetrious"
Casey Brooks04/26/2019, 10:03 PM
Demetrious Robinson04/26/2019, 10:08 PM
LeoColman04/28/2019, 6:05 AM