![]() ![]() will call the toUpperCase() function only when the value is not null otherwise, it will return null. In this example, the safe call operator ?. It enables us to conduct both a null check and a method call with a single expression. ![]() So there's a Safe call operator in Kotlin? This makes things easier by only doing an action when a specified reference contains a non-null value. Null comparisons are straightforward, but the number of nested if-else expressions can be challenging. Now moving on to the safe calls operator.
0 Comments
Leave a Reply. |