Difference between JavaScript and Java

Java is for developping small pieces of code. It is a static typed language, class-based. Its functions are called at object creation. It is essentially used to design compiled programs that are compatible with every platform without direct access to the source code.

JavaScript is to develop scripting language for web browsers; it is dynamic language, prototype based. Its function are standard functions. It is essentially used to create dynamic HTML pages. It allows the page to process input data and maintain this data within the browser.

They are very different despite the names similarity. The both use common C syntax, and some names conventions.