if expression in Kotlin

In this tutorial, we will learn about if expression in Kotlin. In Kotlin “if” is not a keyword(as it was in Java). In Kotlin “if” is an expression and it returns a value. In mean ordinary “If expression” in Kotlin can work just like a ternary operator(condition ? then: else) of Java. Apart from this, …

if expression in Kotlin Read More »