Flex and Java Differences: Getters & Setters
In Java it has become a standard practice to use a getter & setter notation to provide a consistent interface to an object’s properties. There is a reason why we don’t do the following in Java:
public String fullName;
The code above essentially creates an interface (or contract) between the class and the implementors of this class that does not allow us to change the underlying implementation of what gets returned when the fullName property is accessed on an instance of the class. So if someone has Java code that accesses the fullName property: