Java is an object-oriented programming language created in 1995 by Sun Microsystems. It is widely used for both desktop applications and web applications. There are four main types of Java applications: standalone applications, web applications, enterprise applications, and mobile applications. Some examples of where Java is used include gaming, robotics, desktop programs, web applications, mobile devices, smart cards, and embedded systems.