Java is NOT Javascript
Please stop using Java and Javascript interchangeably. Don't make Java or Javascript programmers cringe.
Time after time I have heard someone use Java and Javascript interchangeably. I warn you to NEVER make this mistake and will teach you why. If you ever hear this horrific interchangeable use of these words, PLEASE share this blog with them.
STOP calling Java Javascript
Java and Javascript have nothing similar other than that they are both programming languages and both have the word "Java" in it. It is just like saying a coin and Bitcoin are the same. The only similarity is a word and the general topic (such as currency or programming). It is okay if you have made this mistake before, but the most important thing is that you learn to fix it. I hope you will never say these words interchangeably in the future.
Comparison
I will guide you to see how completely different Java is from Javascript. I will show a comparison to just really see how different they are.
Topic | Java | Javascript | Is it the Same? |
---|---|---|---|
Creation Year | 1995 | 1995 | ✅ |
Creator | James Gosling | Brendan Eich | ❌ |
Main Platform | Desktop Computers and Servers | Websites and Web Servers | ❌ |
Syntax (How code is written) | Very strict syntax and type checking | Very loose syntax and type checking | ❌ |
Type of Programming Language | Static | Dynamic | ❌ |
Type of Object | Object-oriented | Object-based | ❌ |
How it Runs | Compiled into machine-understandable code | Uses a Just-in-Time (JiT) compiler | ❌ |
Where it Runs | The Java Virtual Machine (JVM) | Browser | ❌ |
File Extension | .java |
.js |
❌ |
Frontend or Backend | Backend | Both | ❌ |
Requirements to Run | The Java Development Kit (JDK) | A text editor or browser | ❌ |
As you can see, Java and Javascript are remarkably different. So, please NEVER EVER think that they are equivalent in the future.
Conclusion
Make sure you at least know the definition of words before you use them. You should now know enough between Java and Javascript to not make your programmer friends cringe. Again, please share this blog with people you hear make this mistake.
I hope you enjoyed it!