Not to sound particularly mean, but do you know what you're talking about?
Look at what flowjob said. Javascript and Java are completely different languages. Not at all the same. I think the only reason they have similar names is because of some business agreement or something.
Javascript is used to execute client-side code on websites. This is what enables a website to have a certain amount of interactivity (i.e. drop-down menus, analysis of user-provided data, etc.). It can be used to perform "JavaScript injections," in which the attacker modifies elements of the DOM to change crucial values embedded into a website (look it up). As far as I know, that's about all you can do with it hack-wise.
Java, on the other hand, really has no hacking applications. It's primarily used to power software. It runs in the Java Virtual Machine, which means that the executable file it generates can be accessed on multiple platforms. Regardless, if you're interested in programming in general, I'd highly recommend learning Java, as it's becoming increasingly popular in the world of computers.