Protected vs Private w/ accessor methods
What is the difference, is there one? Or is it just preference.Thank You
In my Java text book, it says that you use accessor methods, but you said it defeats the purpose, so I shouldn't have accessor methods?
He was pointing out a mistake in your first post. The point of an accessor is to allow access to a private member variable. However, if the accessor method is private just like the field it is supposedly providing access to, then there really is no point!