Bean Properties
Bean properties are equivalent to the data fields in a Java object, except that bean properties must be declared as private data fields, and they must be accessible through special public methods known as accessor methods. Properties are discrete chunks of named data that are like attributes of physical objects such as color, temperature, and size. Add a property to a bean by adding a private data field and at least one accessor method. As the creator, you have to decide if a private data field is what you want. If you make it private, you give up some of the benefits of inheritance. This is not the case if you make it a protected property.
Private Data Fields
Use descriptive variable names for your property's private data field. ...
Get JavaBeans Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.