Explore programmers.im
javascript.programmers.im

The official desk

Is JavaScript the same as Java?

The official MDN glossary article titled “JavaScript” answers this directly. The table below sets the two languages side by side, with each fact tied to its source.

The official MDN glossary is blunt: JavaScript should not be confused with the Java programming language. This desk keeps that answer, and the other official wording around it, in the document it came from.

Java, or JavaScript?

The official MDN glossary article titled “JavaScript” says, with the words “should not” emphasised on the page: “JavaScript should not be confused with the Java programming language. Although “Java” and “JavaScript” are trademarks (or registered trademarks) of Oracle in the U.S. and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.” [source]

For a fuller side-by-side look at typing, where the code runs, and how it is compiled or interpreted, see the table on this page, or take the free fact sheet.

A screenshot of JavaScript source that builds a list of weekday names in a browser
JavaScript that builds a list of weekday names in a browser. Lionel Rowe, 18 January 2023. CC0. Photo: Lionel Rowe, 18 January 2023 · CC0 · Wikimedia Commons

Java and JavaScript, side by side

Each cell stays with the official document it comes from. A printable version is in the free downloads.

JavaJavaScript
What it is Oracle describes Java technology as both a programming language and a platform. [source] MDN describes JavaScript as a scripting or programming language that lets you implement complex features on web pages. [source]
How the code is run Source files ending .java are compiled by javac into .class files of bytecodes, the machine language of the Java Virtual Machine. [source] MDN calls JavaScript a lightweight interpreted programming language. Most modern interpreters also use just-in-time compiling at run time, and it is still considered interpreted. [source]
Typing MDN’s Java glossary: Java is statically typed. [source] MDN: JavaScript is a “dynamically typed language”, which means you do not need to specify what data type a variable will contain. [source]

The official glossary sentence

MDN’s glossary says, with “should not” emphasised on the page: “JavaScript should not be confused with the Java programming language. Although “Java” and “JavaScript” are trademarks (or registered trademarks) of Oracle in the U.S. and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.” [source]

The same article opens by saying JavaScript is “used most often for dynamic client-side scripts on webpages, but it is also often used on the server-side, using a runtime such as Node.js, Deno, and Bun.” [source]

Those are glossary sentences, checked on 17 November 2026. MDN also notes that “Java” and “JavaScript” are trademarks (or registered trademarks) of Oracle in the U.S. and other countries.

Next: the third official layer

Keep the lights on

Enjoyed the script?

No pop-ups. No intrusive advertising. Just interesting stuff. A little support helps the next programmers site get built.