Re:Ask HN: Has anyone here programmed in Kotlin? What do you...
by Bienlein on Monday July 27, 2015 @04:53AM
(#9954102)
"Kotlin interfaces are essentially the same as Java interfaces."
Interfaces in Kotlin offer functionality beyond interfaces in Java. In Java interfaces can only have public methods. In Kotlin interfaces can also have (abstract) variables. Both, methods and vars, in Kotlin interfaces can be public and also protected. You need this if you don't want to break the encapsulation of your classes that implement an interface.
[ Parent
| on HN ]
There are no comments on this comment yet.