Yes you can, but that's the ternary operator (Kotlin has that as well, they call it the "Elvis" operator). The article was just pointing out the slight differences between Kotlin and Java; one of them being some statements in Java are treated as expressions in Kotlin.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can actually do this in Java.
Yes you can, but that's the ternary operator (Kotlin has that as well, they call it the "Elvis" operator). The article was just pointing out the slight differences between Kotlin and Java; one of them being some statements in Java are treated as expressions in Kotlin.