A

Admin • 833K Points
Coach

Q. Which Kotlin keyword is used to define a custom getter or setter?

  • (A) getset
  • (B) field
  • (C) accessor
  • (D) property
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin

The 'field' keyword is used within custom getters and setters to refer to the backing field.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.