Your Computer Science Resource

Posts Tagged ‘getters’

Dec
31st

Eclipse: Generate getters and setters

Suppose you have a relatively large class file consisting of 20 or more fields. How long will it take you to write getters and setters so that these fields may be accessed by other classes? Even a fast typist will consider this to be a very tedious task. Isn’t there some way to do this faster? Or perhaps automatically…? Alas, Eclipse can do it for us.

(more…)