<Add public getter in Java to protected field in K...
# stackoverflow
u
Add public getter in Java to protected field in Kotlin? I am doing some refactoring to a base class in Kotlin. It looks like the following: abstract class Base constructor (protected val prop: Int) { //... } I have an implementation in Java that wants to expose prop via a public getter. Is this possible? public class Impl extends Base { public Int getProp() { return prop; } } Causes an error like the following: Impl.java269 error: getProp() in Impl cannot override getProp() in Base public Int getProp() {...