Java is a standalone programming language where code is compiled by the developer before it is ever seen by the user. One of the key points of Java is that it conforms to a WORA (Write Once, Run Anywhere) design scheme, which means that any compiled Java code can run on any system that has a JVM (Java Virtual Machine). A JVM is a specialised virtual machine, designed for the execution of compiled Java bytecode. Java applications are typically server-side when used on the web, although there are many standalone user-facing Java applications.
Java is much more rigid with rules about how variables can only store a specific type of data. Java is therefore more structured, but this adds extra complexity to creating simple code, as lots of boilerplate is needed to declare everything properly. The rigidity does, however, make it easier to coordinate with other developers when collaborating on a project, as there are limited numbers of ways to perform tasks within the structure.