A

Admin • 833K Points
Coach

Q. What will 'val x = 5 / 2' evaluate to in Kotlin?

  • (A) 2.5
  • (B) 2
  • (C) 2.0
  • (D) 5
  • Correct Answer - Option(B)
  • Views: 17
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin

In Kotlin, dividing two integers results in integer division. So 5 / 2 = 2.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.