Demetrious Robinson
04/26/2019, 9:59 PMdata class Person(val firstName: String ="Demetrious", val lastName:String = "Robinson")
val person1 = Person()
println(person1.component1()) // "Demetrious"
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.firstName)
Casey Brooks
04/26/2019, 10:03 PMDemetrious Robinson
04/26/2019, 10:08 PMLeoColman
04/28/2019, 6:05 AM