
上QQ阅读APP看书,第一时间看更新
Escaping for Java identifiers that are keywords in Kotlin
Kotlin was designed with interoperability in mind. The existing code in Java can be called from Kotlin code smoothly, but since Java has different keywords than Kotlin, we sometimes run into issues when we call Java method with a name similar to Kotlin keyword. There is a workaround in Kotlin, which allows a method to be called having a name representing a Kotlin keyword.