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

Does java have anything to do with javascript?

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

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the relationship between java and javascript, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Java has nothing to do with javascript; Java is an object-oriented programming language that can write desktop applications, Web applications, distributed systems and embedded system applications; and javascript is a lightweight, interpretive or just-in-time programming language with function priority.

This article operating environment: windows7 system, javascript1.8.5 version, DELL G3 computer

Java has nothing to do with javascript.

Java and JavaScript are two popular languages at present, but on the surface, their names are very similar, so many beginners are easy to confuse them or directly group them into the same category, but in fact, although the two are closely related, they are two completely different languages.

Java is an object-oriented programming language, which not only absorbs the advantages of C++ language, but also abandons the concepts of multi-inheritance and pointers which are difficult to understand in C++, so Java language has two characteristics: powerful and easy to use. As the representative of static object-oriented programming language, Java language perfectly implements the object-oriented theory and allows programmers to carry out complex programming in an elegant way of thinking.

Java has the characteristics of simplicity, object-oriented, distributed, robust, security, platform independence and portability, multithreading, dynamic and so on. Java can write desktop applications, Web applications, distributed systems, embedded system applications and so on.

JavaScript (JS for short) is a lightweight, interpretive or just-in-time programming language with function priority. Although it is known as a scripting language for developing Web pages, it is also used in many non-browser environments. JavaScript is based on prototype programming, multi-paradigm dynamic scripting language, and supports object-oriented, imperative, declarative, and functional programming paradigms.

JavaScript was first designed and implemented in Netscape Navigator browser by Brendan Eich of Netscape in 1995. Because Netscape works with Sun, Netscape management wants it to look like Java, so it is named JavaScript. But in fact, its grammar style is similar to that of Self and Scheme.

The standard of JavaScript is ECMAScript. As of 2012, all browsers fully support ECMAScript 5.1, and older browsers support at least the ECMAScript 3 standard. On June 17, 2015, ECMA International released the sixth edition of ECMAScript, which is officially called ECMAScript 2015, but is often referred to as ECMAScript 6 or ES2015.

JavaScript was originally inspired by Java, and one of its purposes is to "look like Java", so there are grammatical similarities, and some names and naming conventions are borrowed from Java. But the main design principles of JavaScript come from Self and Scheme.

The similarity between JavaScript and Java is the result of an agreement reached with Sun Microsystems for marketing considerations by Netscape at that time.

It is generally believed that Netscape named LiveScript JavaScript at that time because Java was the most popular programming language at that time, and the name "Java" helped spread the new language.

What JavaScript and java have in common:

Their syntax and C language are very similar.

They are all object-oriented (although implemented in a slightly different way)

JavaScript refers to the naming rules of Java when designing.

The differences between JavaScript and java:

JavaScript is a dynamically typed language, while Java is a statically typed language

JavaScript is weakly typed and Java is strongly typed.

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

The language style of JavaScript is very different except that it looks like Java. The objects that JavaScript refers to at design time do not include Java, but include languages such as Self and Scheme.

Thank you for reading this article carefully. I hope the article "is there a relationship between java and javascript" shared by the editor will be helpful to you? at the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Development

Wechat

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

12
Report