0

If the variable has access modifier "private" which restricts it from getting accessed by other class. Why set public getter methods to access it that private variable? Wouldn't it just be much better to set it to a public variable?. I'm confused. Can someone please explain this. Thank you.

Lorenz
  • 1
  • 1

0 Answers0