ActionScript and Java are both powerful, object-oriented languages with many similarities.
Both Java and ActionScript:
- Are object-oriented
- Use single inheritance
- Have a base Object class (which is automatically sub-classed)
- Use strongly typed variables
- Have Packages, Classes, and Interfaces
- Support public, protected, and private methods and variables
- Support static functions and variables
- Support try/catch/finally exception handling
There are also many differences between ActionScript and Java.
Important differences between Java and ActionScript:
- ActionScript has get/set functions
- ActionScript supports dynamic classes
- ActionScript supports closure functions
- ActionScript supports optional function arguments, but does not support overloading
- ActionScript does not allow private classes or constructors