https://kotlinlang.org logo
#android
Title
# android
l

Lilly

07/09/2020, 6:13 PM
Hi, I have following class
open class XModemPacket(protected var bytes: ByteArray = ByteArray(133))
Can someone give me a hint, how I can have the getter public. I want that every sub class can set it and can be obtained from outside.
m

Mgj

07/09/2020, 6:43 PM
Make it a public property with a protected setter? instead of a constructor argument
l

Lilly

07/10/2020, 12:42 AM
Obvious. Thanks!
rubber duck 1
5 Views