当前页面: 开发资料首页 → Java 专题 → As3.0与java 5语法对比[转贴]
As3.0与java 5语法对比[转贴]
摘要: As3.0与java 5语法对比[转贴]
As3.0与java 5语法对比
Below is a short comparison table of major elements/concepts of these two languages for a quick reference.
You can read this table either left-to-right or right-to-left, depending on what’s your primary programming language is today.
This list is not complete, and your input is appreciated.
Concept/Language | Java 5.0 | ActionScript 3.0
Construct | |
-----------------------------------------------------------------------------------------------------------
Class library | .jar | .swc
packaging | |
-----------------------------------------------------------------------------------------------------------
Inheritance | class Employee | class Employee
| extends Person{…} | extends Person{…}
-----------------------------------------------------------------------------------------------------------
Variable | String firstName="John"; | var firstName:String=”John”;
|Date shipDate=new Date(); |var shipDate:Date=new Date();
declaration | int i; | var i:int;
| int a, b=10; | var a:int, b:int=10;
and initialization | double salary; | var salary:Number;
----------------------------------------------------------------------------------------------------------------
完整的文章点击下面下载:
显示被隐藏内容 点击下载此文件