The differences are countless. The explanation of the name is:
- both of them use similar syntax, and
- both of them was developed by Sun.
Some other important differences:
- JS doesn't have Class-inheritance, but prototype inheritance.
- JS doesn't have access modifiers like public, private and protected.
- JS doesn't have classes, all class behaviour is done through constructors
- JS has closures, Java does not
- In JS semicolons are optional
There are significant, differences between the two: