What Is Java?
Java is a general-purpose, object-oriented programming language. Source code is compiled into an intermediate form called bytecode, which runs on the Java Virtual Machine (JVM) rather than directly on a specific processor.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
That JVM layer is the source of Java's famous "write once, run
anywhere" promise — the same compiled .class file runs unchanged on
Windows, macOS, or Linux, as long as each has a JVM installed. Java is
statically typed (every variable's type is fixed and checked at
compile time) and strictly object-oriented — even a simple program's
entry point must live inside a class.