I'm a little confused: can I override setter / getter but still use super setter / getter? If so, how?
Use Case:
class A {
void set value(num a) {
// do something smart here
}
}
class B extends A {
void set value(num a) {
// call parent setter and then do something even smarter
}
}
If this is not possible, how can you save the API, but expand the logic in the new class. Code users already use instance.value = ... so I don’t want to change it to a method call.
Please, help:)
source
share