A

Admin • 833K Points
Coach

Q. What is the default return type of a Kotlin function if none is specified?

  • (A) Int
  • (B) Any
  • (C) Unit
  • (D) void
  • Correct Answer - Option(C)
  • Views: 20
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin

Kotlin functions without a specified return type default to 'Unit', which is similar to Java's 'void'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.