/** * @authorhttp://roucheng.cnblogs.com* @version 2016-05-08*/ Public classPerson {PrivateString UserName; PrivateString user_name; PrivateString Usname; PrivateString UName; PrivateString Name; PrivateString UName; //The most standard of//It won't be a problem.//Recommended +++++ PublicString GetUserName () {returnUserName; } //does not conform to Sun's recommended specifications, but it is also a good choice when it corresponds to a database (database field with _ delimited words) one by one. //It won't be a problem.//Recommended ++++ PublicString Getuser_name () {returnuser_name; } //not standardized//no problem (more than two letters per word)//Recommendation- PublicString Getusname () {returnUsname; } //not standardized! //Very prone to problems, it is easy to write getuname, some versions of Eclipse automatically generate getuname and cause errors,//Recommended--- PublicString Getuname () {returnUName; } //Specifications! //is wrong! GetName the corresponding attribute should be name instead of name//Recommended----- PublicString GetName () {returnName; } //normative, but not easy to understand, easy to confuse//No problems, but not easy to understand, easy to confuse//Recommendation-- PublicString Getuname () {returnUName; } } /*how to ask Hovertree.com*/
Recommendation: http://www.cnblogs.com/roucheng/p/3504465.html
JavaBean's Little knowledge point