No, Java is not smaller JavaScript
I realized a few times that someone in the debate freely exchanged Java vs. JavaScript. It looks like many people assume that these two technologies are somehow connected.
They aren't, but why are their names so identical? This is primarily due to a marketing ploy, because Java started to become very successful back in 1995. And new language - JavaScript - which was supposed to bring life to the purely static web, could surf a ride on Java's wave of popularity.
Let's briefly look at what is behind these two. Java - is currently one of the most popular, general-purpose programming languages. James Gosling originally developed it at Sun Microsystems. The project "Oak" was kicked off in 1991, having the name after the tree that stood outside of Gosling's office. Later the project was renamed Java, from the coffee which the team was widely consuming.
The entire ecosystem is very capable and field-tested by many use cases. Java has become a lingua franca for enterprise applications running on servers somewhere in datacenters. One could even say that it's the "new COBOL" used on mainframe computers in old times.
How is JavaScript different ❓
🌏 Imagine back in 1995. After loading the www page in the browser, there were no dynamic items — no opening menus, no smart typing suggesters. Netscape wanted to offer more user interactivity for their new revolutionary browser Netscape Navigator. The solution introduced the scripting language embedded directly into the page's HTML code - today known as JavaScript. Programmers got the possibility to access and dynamically change page components which enabled building web applications as we know them nowadays.
Recommended by LinkedIn
🤔 Few more aliases to get even more confused
JavaScript was introduced in the beta version of Netscape Navigator named LiveScript. Later, it was changed to JavaScript to complement Java as an additional scripting language. Sun and Netscape aligned on the naming back then. But later on, Netscape revoked the right to use the name JavaScript, so the language was named ECMAScript in the standard specification process. Slightly after, Microsoft came with its version called JScript.
🫣 Easy conclusion, unless it's not
So as you can see, the terminology can be very confusing. But you could simplify it to the statement:
Front-end developers use JavaScript, and back-end developers use Java.
Well, except when JavaScript is used to build server applications using Node.js runtime environment ;-) Luckily the opposite isn't the case, as Java never significantly influenced the front-end development ecosystem.
I hope I have shed some light on this confusing topic.