Setter And Getter Java Cheat Sheet Code Example

Snippet 1
  public getValue() {
  return value;
} 
Snippet 2
  public setValue(value) {
  this.value = value;
}