menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Compatibli...
source image

RandomThoughts

2M

read

137

img
dot

Compatiblity between Kotlin and Java regarding Default Methods

  • Default methods in interfaces in Kotlin are not compatible with Java.
  • When using default methods in interfaces, the default implementation is not visible when called from Java.
  • The deprecated @JvmDefault annotation has been replaced by @JvmDefaultWithoutCompatibility1 and @JvmDefaultWithCompatibility2.
  • Kotlin automatically creates an Abstract class in the Interface called Interface$DefaultImpls to implement default methods.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app