It can be used when developers expect to return a default value when the reference is null:
val hash:TrackedHashTag? = TrackedHashTag(hashTag="java",queue="java")val queueString = hash?.queue ?: "unrecognized-queue"
When the value holds null, the default value will be returned.
Time to use Kotlin in the real world. Let's begin.