Eclipse Tool Tip #1: Getters and Setters

Currently my favorite IDE is Eclipse 3.1.0. For this inaugural Eclipse Tool Tip, I will just mention a time saver of a feature. When creating a new JavaBean, start by defining the attributes. Once this is done, go to Source > Generate setters and getters. This will open a wizard to allow you to select the attributes which you will generate setter and getter methods. This feature will save you minutes of repetitive ‘cut and paste’ programming.

Leave a Reply