![image](https://qph.ec.quoracdn.net/main-qimg-dc1a23854f0be7283cfea8740caade1a.webp)
This quote rightly explains that 2 totally different things cannot be compared.
Some of the major differences between Java and JavaScript are as follows:
Java:
· It is an OOP programming language
· Code is compiled before execution
· Runs on a virtual machine or a browser
· Static type checking
JavaScript:
· It is an OOP scripting language
· Runs on a browser ONLY
· Code is interpreted / Just in Time(JIT) compiled before execution
· Dynamic type checking