A

Admin • 833K Points
Coach

Q. What will 'val x: Int? = null' do?

  • (A) Throws an error
  • (B) Creates a non-nullable integer
  • (C) Creates a nullable integer that is null
  • (D) Creates a float
  • Correct Answer - Option(C)
  • Views: 22
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin

This declares a nullable integer and assigns it a null value.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.