Getters / setters when the first word is capitalized

What should we expect from the next name ?: mGage Program

if i believe in camelCase it will mGageProgram

, and if i generate (in eclipse) getters and setters i get this:

public String getmGageProgram() {
    return mGageProgram;
}

public void setmGageProgram(String mGageProgram) {
    this.mGageProgram = mGageProgram;
}

      

Which seems wrong to me as I expected getMGageProgram()

and setMGageProgram(value)

.

Are these getters / setters names?

+3


source to share


2 answers


According to the 8.8: Capitalization of inferred names of the JavaBeans API specification

names generated from the IDE are correct .



+3


source


they are 100% correct :) but the conventions differ between programmers, for me its method names in camel shell are not variables. as for the syntax is correct :)



+2


source







All Articles