JavaBeans Naming Convention : JavaBeans « Object Oriented « SCJP






A property name begins with a lowercase letter. 

public class MainClass{
    private int iValue= 0;
    
    public static void main(String[] argv){
    
    }
}


If the property is not a boolean, the getter method's prefix must be get. 

If the property is a boolean, the getter method's prefix is either get or is. 
For example, getStopped() or isStopped() are both valid JavaBeans names for a boolean property.

To complete the name of a getter or setter method, change the first letter of the property name to uppercase, 
and then append it to the appropriate prefix (get, is, or set).

Setter method signatures must be marked public, with a void return type and 
an argument that represents the property type.

Getter method signatures must be marked public, take no arguments, 
and have a return type that matches the argument type of the setter method for that property.








6.10.JavaBeans
6.10.1.JavaBeans Naming Convention
6.10.2.A method that returns the value of a property is named getXxx(), where xxx is the property name.
6.10.3.A method that modifies the value of a property is named setXxx(), where xxx is the property name.