fun main(args: Array<String>) {
val texto: String? = null
println(texto!!) //gerará uma exceção
//seria o mesmo que println(texto ?: throw NullPointerException("mensagem de erro padrão"))
//ou ainda println(texto != null ? texto : throw NullPointerException("mensagem de erro padrão"))
}
//https://pt.stackoverflow.com/q/226862/101
ZnVuIG1haW4oYXJnczogQXJyYXk8U3RyaW5nPikgewogICAgdmFsIHRleHRvOiBTdHJpbmc/ID0gbnVsbAogICAgcHJpbnRsbih0ZXh0byEhKSAvL2dlcmFyw6EgdW1hIGV4Y2XDp8OjbwogICAgLy9zZXJpYSBvIG1lc21vIHF1ZSBwcmludGxuKHRleHRvID86IHRocm93IE51bGxQb2ludGVyRXhjZXB0aW9uKCJtZW5zYWdlbSBkZSBlcnJvIHBhZHLDo28iKSkKICAgIC8vb3UgYWluZGEgcHJpbnRsbih0ZXh0byAhPSBudWxsID8gdGV4dG8gOiB0aHJvdyBOdWxsUG9pbnRlckV4Y2VwdGlvbigibWVuc2FnZW0gZGUgZXJybyBwYWRyw6NvIikpCn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzIyNjg2Mi8xMDE=