MCQs > IT & Programming > Kotlin > Which snippet correctly shows setting the variable max to whichever variable holds the greatest value, a or b, using idiomatic Kotlin?

Kotlin MCQs

Which snippet correctly shows setting the variable max to whichever variable holds the greatest value, a or b, using idiomatic Kotlin?

Answer

Correct Answer: Val max3 = a.max(b) (Extension Function is One of the idiomatic Solutions in Kotlin)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Kotlin Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Kotlin Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it