that's now Java works. unclear how anything else would make sense.
ephemient
05/14/2021, 7:23 PM
private methods must be non-abstract and cannot be overridden - doesn't fit in an interface
ephemient
05/14/2021, 7:24 PM
protected methods can only be called by inheritors - just define the method in first implementing base class, it will be available to all inheritors
l
LastExceed
05/14/2021, 7:28 PM
what about internal ?
e
ephemient
05/14/2021, 8:11 PM
you can make an internal interface, if you want. but note that all supertypes are part of your public ABI, even if they're "internal"
n
nanodeath
05/14/2021, 8:44 PM
btw Java 9+ does allow private methods in interfaces
e
ephemient
05/14/2021, 8:52 PM
makes more sense in Java, IMO. they're there to be callable from the default implementations, but they could just as well be top-level functions in Kotlin - you can't store any state either way