Reputation: 6307
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
?
Upvotes: 3
Views: 851
Reputation: 44929
It should be isShowLabels
weird as that may sound, that's the convention. You could always rename the boolean to showingLabels
.
Upvotes: 9