Kotlin - Null Safety
How can you safely call a method
process() on an object obj that might be null, and if null, call defaultProcess() instead?process() on an object obj that might be null, and if null, call defaultProcess() instead?obj?.process() calls process() only if obj is not null.?: calls defaultProcess() if the safe call returns null.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions