3 ms·
> ...the first example "encapsulation" demonstrates exactly no encapsulation. It demonstrates a kind of getter, but a weird one since it returns a mutable fiel
by solidsnack9000 9y ago
> ...the first example "encapsulation" demonstrates exactly no encapsulation.
It demonstrates a kind of getter, but a weird one since it returns a mutable field. These are not the most encapsulated thing.