I am defining like a instance variable in kotlin and want to initialize it onCreate method of an activity.
kotlin
onCreate
activity
var count:
There's no reason to leave it uninitialized. Just initialize it to 0 or -1.
lateinit is for non-null object references that can't easily be initialized in the class body definition.
lateinit