I have a data class in Kotlin - where there are 5-6 fields,
data class DataClass(
val attribute1: String?,
val attribute2: String?,
val attribute3: Boolean?
)
i can initialise the class with DataClass(attribute1="ok", attribute2=null, attribute3= null)
Is there any way to prevent null values in data class ?
?is to allow null values, so just remove it.