object-oriented-design

  • submit to reddit

Getter Setter: To Use or Not to Use

Java Getter Setter Why do we keep instance variables private? We don’t want other classes to depend on them. Moreover it gives the flexibility to change a...

13 replies - 16759 views - 10/19/10 by Muhammad Khojaye in Articles

Java: Getters and Setters

Why do we keep instance variables private? We don’t want other classes to depend on them. Moreover it gives the flexibility to change a variable’s type or...

0 replies - 4597 views - 09/10/10 by Muhammad Khojaye in Articles