Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Is javascript a scripting form of the java language?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "whether javascript is the script form of java language". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "javascript is not the script form of java language".

Javascript is not a scripted form of the java language, they are two completely different language architectures. Java is an object-oriented statically typed language, while JavaScript is an object-and event-driven dynamically typed language; the source code of Java must be compiled before execution, and JavaScript code is not needed.

The operating environment of this tutorial: windows7 system, javascript1.8.5&&java8 version, Dell G3 computer.

Javascript is not a scripted form of the java language, and the two are completely different. They are two completely different language architectures.

The difference between java and javascript:

Java mainly runs on the server side; javascript mainly runs on the client browser

Java is an object-oriented language and JavaScript is a scripting language based on object and event-driven language.

Java needs to run on JDK or JRE's JVM (Java virtual machine), while JavaScript runs on Web browsers, so no specific platform is required. Java runs mainly on the server side; javascript mainly runs on the client browser.

The source code of Java must be compiled before execution, while the code of JavaScript is not needed and can be interpreted and executed directly by the browser.

The variable types taken by javascript and Java are different.

JavaScript is a dynamically typed language; Java is a statically typed language. Java cannot change the length of an array after defining it, but javascript can.

Variable declarations in javascript are weakly typed, that is, variables do not need to be declared before they are used, but the interpreter checks their data types at run time. Java uses strongly typed variable checking, that is, all variables must be declared before compilation.

JavaScript is weakly typed, that is, it is not declared before use, but the browser interpreter checks the data type at run time; Java is strongly typed, that is, all variables must be declared before compilation

The object-oriented implementation of JavaScript is based on prototype-based, and Java is based on class-based.

The syntax rules of Java are much stricter and more powerful than JavaScript.

The code of the java language is a HTML-independent language; the code of the javascript language is a text character format that can be embedded directly into an HTML document and can be loaded dynamically.

Javascript does not manipulate text and graphics directly, it works with combinations of HTML elements in Web pages, but it controls the browser and allows browsers to process text and graphics directly. On the other hand, Java can manipulate text and graphics directly.

Thank you for reading, the above is the content of "javascript is not the script form of java language", after the study of this article, I believe you have a deeper understanding of whether javascript is the script form of java language, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report