user496949 user496949 - 1 year ago 84
Java Question

For a boolean field, what is the naming convention for its getter/setter?


boolean isCurrent = false;

What do you name its getter and setter?

Answer Source

Suppose you have

boolean active;

Accessors method would be

public boolean isActive(){return;}

public void setActive(boolean active){ = active;}

See Also

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download