A typical "getter" for <code>private int age;</code>
- A
public int age() { age++; }
- B
public void getAge() { return age; }
- C
public static int getAge();
- Dcheck_circle
public int getAge() { return age; }
Explanation
Returns the field; non-static; no parameters.