The properties in Java are generally understood to be derived from the get and set method names when their names are generic.
A field, usually called an "object member."
The rule is to remove the remaining string after get or set, and if the second letter is lowercase, turn the first letter into lowercase
Getage---->age
GETCPU---->CPU
property is limited to the declaration of a method in a class and is not related to other members of the class, but belongs to the JavaBean category. For example:
void SetA (string s) {}
String Geta () {}
When you have such a pair of methods in a class, we can say that the class has a read-write a property (note that it is lowercase a). If you remove the set method, it is a readable property and vice versa.
For example, the following class:
public class Person {
private int x;
public int Getage () {
return x;
}
public void setage (int age) {
this.x=age;
}
}
When I manipulate this class, such as calling the Getage () method, we say that we get the age property, and we call the Setage method to say that we have set the Age property, because the X field is private to us, and we don't see the X field when we manipulate the person class.
For the MyBatis mapping configuration file, the
<resultmap type= "Author" id= "Baseresultmap" ><id property= "id" column= "id"/><result property= " Username "column=" username "/><result property=" password "column=" password "/><result property=" Email " column= "Email"/><result property= "bio" column= "bio"/><result property= "favouritesection" column= " Favourite_section "/></resultmap>
These
Property refers to an attribute, not a field.
There are JSP tag libraries in the use of JSP pages, also refers to attributes, not fields.
The difference between attributes and fields in Java, many people are inseparable. Especially the mybatis,spring configuration above the reflection technology, JSTL label