'When to use empty values ("",0) vs null in kotlin
What is the difference between this data class
data class Greeting(
val name: String,
val country: String? = null
)
VS
data class Greeting(
val name: String,
val country: String = ""
)
Is their any preferred way when we use null and empty values such as "",0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
