Ask coding questions

← Back to all posts
Smart Cast in Java and Kotlin
ankitdixit09

Hello All, I want to know which one is better for smart cast feature between kotlin and java? According to this post https://www.interviewbit.com/blog/kotlin-vs-java/ Kotlin provides a smart cast feature i.e Kotlin compiler track tracks condition inside if expression but not an idea about java? Can anyone explain me about smart cast feature in java?

Voters
ankitdixit09