Kotlin's feature that prevents NullPointerExceptions at compile time is called:

  1. Null safety (nullable types like String?)
  2. Garbage collection
  3. Inheritance
  4. Reflection
Answer

A) Null safety (nullable types like String?)

The type system distinguishes nullable and non-null types.

Computer Science MCQ · More App Store Deployment and Mobile Programming Languages MCQs · Practise