In reply to Reuben:
The way to do this it to write class accessors methods.
See Using Accessors and Mutators in Java