Java is a general-purpose object-oriented language designed by James Gosling. It is notable for its use as part of the Android operating system, and as a server-side implementation language for web applications and web services.

Programs written in Java are portable between different machine architectures, and to some extent between different operating systems. This portability extends to executable programs when compiled to run on a virtual machine such as the JVM or Dalvik.

Programming errors that invoke undefined behaviour in C or C++ are typically either impossible in Java, or cause the program in a controlled manner by throwing an exception. This behaviour makes Java a good choice of language for processing data from untrusted sources.

Early versions of Java performed poorly due to the virtual machine technology available at the time, but modern JIT compilers have reduced this performance penalty to a level that is insignificant for most purposes.


Further reading