I have been using/learning Kotlin for a while now and I have only once seen ` being used.
System. `in`
I have tried finding something about this, but I was not able to.
It’s the syntax for escaping keywords like in
. When a Java library uses one of these as an identifier (function/property name etc), it must be surrounded with backticks if called from Kotlin. Otherwise, the compiler tries to interpret it as a keyword which will make the code fail to compile.
Escaping for Java identifiers that are keywords in Kotlin
Some of the Kotlin keywords are valid identifiers in Java:
in
,object
,is
, etc. If a Java library uses a Kotlin keyword for a method, you can still call the method escaping it with the backtick (`) character:foo.`is`(bar)
Here’s a list of keywords: https://kotlinlang.org/docs/reference/keyword-reference.html