Close

Report a typo

Name a Kotlin keyword you can use to close an object after it has been used.

val cursor = db.query(
    "chats", null, "id = ?", arrayOf(id.toString()), null, null, null
)
try {
    if (cursor.moveToFirst()) return Chat(cursor)
} _______ {
    cursor.close()
}
return null
Enter a short text
___

Create a free account to access the full topic