Accessor (getter) method: A method that returns the value of a private instance variable.
How to apply it: Write getters following the pattern: public Type getField() { return field; }.
Course: AP Computer Science A · Unit: Writing Classes
Practice questions about Accessor (getter) method on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.