kotlin check if variable is initialized
snippet in kotlin

kotlin check if variable is initialized

user9822

lateinit var file: File    

if (this::file.isInitialized) { ... }