JavaScipt is, as the name implies, a *SCRIPTING* language. It is used primarily as *THE* scripting language of the Web, as a part of probably most HTML pages that are out there.
It is an "untyped" language, meaning that variables do not have declared types. You can do stuff like this:
var a = 3.14159264; // hold a floating point number
a = "change it to a string";
a = new Date(); // change it to an object reference
a = false; // and a boolean
Java, the language you are studying, is a COMPILED language. When it executes, it normally is compiled all they way down to the machine code of the CPU in use. It is a tightly typed language: You must declare all your variables to be a single data type, and you can't assign a value of a different type to a variable (but look up "cast" for ways to change types). Java normally runs on the server (when used in a Web environment) or it can execute standalone code (that is, code that runs on the same computer where the files are found...not sent from a server to a client).
The general syntax of the two languages does, at first glance, appear to be quite similar. In reality, the similarities are pretty much the same as you find between Java and C and C++ and C# and other related languages. Operators and variable usage look the same, but once you start getting into other coding, the difference are more profound than the similarities.
There, that was the short version. For the long version, send $19.95 and two boxtops to ...