Pages

Saturday, November 16, 2013

How to generate setters and getters in java -Eclipse

1)Right click on the member variables in the java class for which the setter and getter values need to be generated.
2)Select source->Generate Setters and getters and click on it
3)Tick  the variables in the pop up box for which setters and getters are to be generated .See the snapshot below.
4) By clicking on OK the respective methods are generated.

No comments:

Post a Comment