This delegate property is similar to lateinit properties. It allows a property to be declared without an initial value. If the value hasn’t been set yet and you try to read it, an exception is thrown:
var notNull by Delegates.notNull<Int>()
The value hasn't been set yet and if we try to read it, an exception will be thrown:
//this results in exception
val n = notNull
We have to assign a value to the property first:
notNull = 1
val num = notNull