Kotlin - Null Safety
Which of the following is the correct syntax for a safe cast in Kotlin?
val x = obj ___ String
Which of the following is the correct syntax for a safe cast in Kotlin?
val x = obj ___ String
as? which tries to cast safely.val x = obj as? String attempts to cast obj to String safely.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions