Java and Javascript are similar like Car and Carpet are similar.or
Java is to JavaScript as ham is to hamster.One may say "Ham is to Hamster... technically they are both meat...". JavaScript sounds like it has something to do with Java. It doesn’t.
Yes, both are programming languages and belong to the programming world. However, aside from this apparently confusing similarity, the two languages could not be further from the same thing. Apart from some superficial syntactical similarities, they have nothing in common.
This page will be the page for the guys, who are still asking this kind of question, will redirect them here :)