Differences in Getters/Setters of Java vs ActionScript
Below are the differences in Getters and Setters method of Java and ActionScript.
ActionScript
- getters and setters are part of the core ECMAScript language,
- the externally visible interface doesn't change when I change a public member variable to private with public getter/setter and back again.
- the interface hiding is supported by the language and creating public member variables is safe
Java
- getters and setters are done through a naming convention.
- make member variables public is not recommended
- interface changes if you convert a public member to a private member with public getter/setter functions,
Comments
Post a Comment