
1.Java developed by Sun Microsystems and JavaScript developed by Netscape.
2.Java is an object-oriented programming language. It can be used to develop stand alone application, web application, or applet (mini application for web page). On the other hand JavaScript is smaller programming language. Some references even said that JavaScript is more appropriate to be called scripting language rather than programming language. JavaScript code commonly is injected into HTML code in order to provide levels of interactivity. JavaScript can provide functions or logical operations such as if..then, while..do, for, etc which can’t be tackled by flat HTML. JavaScript can’t be used for developing stand alone application.
3.Java's objects are class-based; JavaScript's objects are prototype-based.
4.JavaScript needs browser for running the code. On the other hand Java besides can be run in browser it also can be compiled and run in virtual machine
5.Java has static typing, JavaScript's typing is dynamic. It means a variable in JavaScript can hold an object of any type and cannot be restricted.
No comments:
Post a Comment