Kotlin Interop guide
Interop guide A set of rules for authoring public APIs in Java and Kotlin with the intent that the code will feel idiomatic when consumed from the other language. Last update: 2017-11-02 Java (for Kotlin consumption) No hard keywords Do not use Kotlin’s hard keywords as the name of methods or fields. These require the use of backticks to escape when calling from Kotlin. Soft keywords , modifier keywords , and special identifiers are allowed. For example, Mockito’s when function requires backticks when used from Kotlin: val callable = Mockito . mock ( Callable :: class . java ) Mockito . `when` ( callable . call ()). thenReturn ( /* … */ ) Lambda parameters last Parameter types eligible for SAM conversion should be last. For example, RxJava 2’s Flowable.create() method signature is defined as: public static < T > Flowable < T > create ( FlowableOnSubscribe < T ...