Handling Nulls

Filtering out not nulls from list

Solution

Usage of ?. for nullable values

Solution


Iterate and perform action only on non null values

Solution


Substituting values when its null

Solution


Throw specific exception on null value

Solution


Throw specific exception on null value

Solution


References:
  • https://blog.logrocket.com/complete-guide-null-safety-kotlin/
  • https://kotlinlang.org/docs/scope-functions.html
  • Popular posts from this blog