java is simply a language, the main downfall to java is that it requires an app to compile and run so it isn't as powerful in that sence as C or C++ but it can be used with HTML, it is used in gaming code...just about everywhere with the exception of OSs.
What java lacks in speed, it makes up for with its ability to go cross-platform without having to recompile or port code. A java program written on a windows box will run on a linux box and macintosh, etc as long as they have the java virtual machine.
The source code you write is turned into byte code for the JVM. Then the java interpreter translates the byte code into machine code on the fly.