Re: other class cant change variables in another class.
Posted: Sun Jan 25, 2009 1:51 pm
Yeah it's much better practice to restrict immediate access to your variables, accessor methods help prevent unwanted mistakes bugs and errors (or deliberate hacks from users of your class).