MCQs > IT & Programming > Kotlin > Which line of code shows how to display a nullable string's length and shows 0 instead of null?

Kotlin MCQs

Which line of code shows how to display a nullable string's length and shows 0 instead of null?

Answer

Correct Answer: Println(b?.length ?: 0)

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