4 ms·
Not if you need to implement some setter logic though, or want to reserve the option to do so in the future. And not if you want those instance variables to be
by pivo 5y ago
Not if you need to implement some setter logic though, or want to reserve the option to do so in the future. And not if you want those instance variables to be available as JavaBean properties.
I haven't developed in Java in a long time, but public instance variables were a no-no when I did for these reasons.