JavaScript and Java are often confused due to their similar names. But that's where most of the similarity ends. JavaScript does resemble Java in a few general ways, but it's a lot looser in terms of data typing, and it's an interpreted language, which means that JavaScript code is compiled at runtime by the client. A Java developer using the Java Developer Kit or a built-in compiler in a Java editor compiles Java, and the compiled code is sent to the client machine to be executed by the Java Virtual Machine (JVM) on the client.
Java and JavaScript are both based on object-oriented models, but Java's compiling requirements, specific data typing restrictions, and object hierarchy requirements, as well as the Java syntax, make Java harder to code, but more powerful. Consequently, JavaScript is more widely adopted for simple development requirements, whereas Java is implemented for more complex functionality.
posted on 2006-05-18 00:21
SmileFace 阅读(276)
评论(1) 编辑 收藏 所属分类:
Java-Studying