I have a boolean field called showLabels in a Bean class, and I want to provide getter and setter methods for it. The setter will be setShowLabels, but should the getter be isShowingLabels, isShowLabels (that’s really weird sounding), or setShowLabels?
I have a boolean field called showLabels in a Bean class, and I want
Share
It should be
isShowLabelsweird as that may sound, that’s the convention. You could always rename the boolean toshowingLabels.