Home  >  Article  >  Web Front-end  >  What is the difference between javascript and java

What is the difference between javascript and java

coldplay.xixi
coldplay.xixiOriginal
2021-03-31 09:51:5413094browse

The difference between javascript and java: 1. JavaScript is a lightweight programming language, and Java is a language that is executed through interpretation; 2. Java is widely used on PCs, mobile phones, the Internet, Data Center, etc., while JavaScript is mainly used to embed text into HTML pages.

What is the difference between javascript and java

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

The difference between javascript and java:

Due to the similarity in the names of JavaScript and Java languages, most students think that JavaScript and Java languages ​​have a certain correlation. But they are not as closely related as we think, and it can even be said with certainty that they are very different.

1. Languages ​​are essentially different.

JavaScript is a lightweight programming language that is programming code that can be inserted into HTML pages. After being inserted into HTML pages, it can be executed by all modern browsers.

Java is a language that is executed through interpretation.

2. The data types are different.

Java data types include: int, double, char, Boolean, etc.

JavaScript data types include: number, string, Boolean, etc.

3. Different application scopes.

Java is widely used on PCs, mobile phones, the Internet, data centers, etc.

JavaScript is mainly used to embed text into HTML pages, read and write HTML, control cookies, etc.

To sum up, we can find that although JavaScript and Java can both be applied to web design, they are actually two languages.

Related free learning recommendations: javascript learning tutorial, java basic tutorial

The above is the detailed content of What is the difference between javascript and java. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn