is it ok to override a java default method (in the...
# announcements
d
is it ok to override a java default method (in the kotlin subclass interface of the java interface)? I ask because you can't call it via super so was wondering if there could be any unforseen consequences
k
Are you talking about a default method in a Kotlin interface? If so, you can't call it via super because default methods don't exist in jdk6, so Kotlin uses a trick to make them work, every implementation automatically calls
MyInterface.DefaultMethods.myDefaultMethod(this)
or something like that. You should be fine overriding it, and if you want you can also call the default method from Java.
d
yes, thanks for the explanation