Monday, February 26, 2007

JavaScript compared to Java

JavaScript
Object-oriented. No distinction between types of objects. Inheritance is through the prototype mechanism, and properties and methods can be added to any object dynamically.
Variable data types not declared (dynamic typing).
Cannot automatically write to hard disk.

Java
Class-based. Objects are divided into classes and instances with all inheritance through the class hierarchy. Classes and instances cannot have properties or methods added dynamically.
Variable data types must be declared (static typing).
Cannot automatically write to hard disk.

No comments :