hello. I have two Kotlin classes -> Human and M...
# android
p
hello. I have two Kotlin classes -> Human and Main. Human is a model class which has private var - name, age, address, language. I want to create a Human instance in Main and access all of its data fields. In Java, we used to implement getter and setter for each field. What is the tradition in Kotlin? and also, how do we generate getter setter like we used to do for Java?
k
How this answer question ?
u
it has proper explanation of how to create and use data classes in kotlin
if you have time then please write a proper answer instead of pointing mistakes in other peoples answer @Kamil Kalisz