Java is the name for both the programming language that can be used for developing complex web applications and for the software platform that used this programming language as its most important component.
Java is an object-oriented language with a thoroughly worked through object model. It can be used to develop both standalone and web applications and suits both purposes equally well. Its syntax is based on C and C++, but the language itself is different and focuses more on high-level programming, so its low-level facilities have been reduced, compared to C.
Speaking about Java as a web programming tool we have to mention Java applets. They can be run in web browsers, to which they are delivered in the form of Java bytecode. They are widely used to provide interactive functionality to web applications including web games and provide an alternative to Flash. Apart from that, Java applets can be used to provide command-line interfaces to remote systems.