Thingking in Java translation version is too difficult to read
Simply speaking, the translator is completely in English, grammar and Logic translated, and the Chinese is a lot of difference AH sister!
Have free time, I also want to translate the original English book
Or maybe it's better to translate this tij than you.
In addition, the book is a lot of Java related words do not understand, and there is no detailed explanation, is it I picked up the reason for reading?
Like what:
What's JavaBeans? What are the components? Search for it ...
where JavaBeans
I think the better definition is "a software component structure that extends the capabilities of the Java language to construct reusable software components." "
Put a picture first, the source as above hyperlink
Then introduce the bean properties.
Properties are separated from each other, and they are named for attributes that affect the appearance or behavior of the JavaBean, usually the bean's data field. Private data fields are often used to hide the implementation details from the user and prevent accidental user damage. The Get/set method is used to ensure that the user can read and write this property.
How to name the property:
In general, theget method is named get<propertyname> (), with no arguments, and returns a base data type value or object that is consistent with the property type. For example:
Public String GetMessage () {}
public int getxcoordinate () {}
For a Boolean property, theget method is named is<propertyname> () and returns a Boolean value, for example:
public Boolean iscentered () {}
The set method should be named set<propertyname> (DataType p) with a parameter that is the same as the property type, and the return value is void, for example:
public void Setmessage (String s) {}
public void setxcoordinate (int x) {}
Attributes describe the state of a bean, which is used to store properties, but the bean attribute does not have to be a data field. For example:
public int getmessagelength () {
return Message.length ();
}
In simple terms, it is a series of getxxx,setxx,isxxx methods that are encountered when looking at someone else's code.
Later, the author seems to have an example of the event monitoring model ·
Currently only in the book to see the concept, and so I do not in the actual project operation will understand the deeper.
Java_tij_ chapter Sixth-access control permissions