Skip to main content

Java

Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/java

In short

Java is a statically typed, object-oriented programming language that compiles to bytecode for the Java Virtual Machine, so programs run on many platforms.

What is Java?

Java is a general-purpose, object-oriented programming language first released by Sun Microsystems in 1995 and now developed by Oracle together with the open-source OpenJDK community. Its motto, "write once, run anywhere," describes the core idea: Java source code is compiled into bytecode, which runs on any device that has a Java Virtual Machine (JVM). A new version ships every six months, with a long-term support (LTS) release every two years.

Java is statically typed, so every variable's type is known at compile time and many mistakes are caught before the program runs. Since Java 10, the var keyword lets the compiler infer the type of a local variable, but that type is still fixed. Memory is managed by a garbage collector, and there is no manual freeing of memory or pointer arithmetic. While a program runs, the JVM's just-in-time (JIT) compiler turns frequently used bytecode into fast native machine code.

Java is widely used for enterprise backend systems, banking and payment software, big data tools, and Android apps. The JVM works like a universal adapter: you compile the program once, and each operating system's JVM takes care of running it on that machine's hardware. Other languages, such as Kotlin and Scala, also compile to JVM bytecode and can use Java libraries.

Java and JavaScript are completely separate languages, despite the similar names. JavaScript was named in 1995 largely as a marketing move while Java was popular, and developers like to say the two are as related as car and carpet. Java is statically typed, compiled to bytecode, and runs on the JVM, while JavaScript is dynamically typed and runs mainly in web browsers and on servers through runtimes like Node.js.

Key takeaways

  • Java is not related to JavaScript; the similar name is a historical marketing decision.
  • Code compiles to bytecode that runs on the Java Virtual Machine (JVM).
  • It is statically typed and strongly object-oriented.
  • Memory is managed automatically by a garbage collector.
  • It is widely used for enterprise backends, Android apps, and large-scale systems.

Example

Hello world in Javajava
// Every Java program starts from a main method inside a class
public class Hello {
    public static void main(String[] args) {
        String name = "World";
        System.out.println("Hello, " + name + "!");
    }
}

Readers ask

Is Java the same as JavaScript?

No. They are separate languages with different designs, runtimes, and uses. Java is statically typed and runs on the JVM, while JavaScript is dynamically typed and runs mainly in browsers and in server runtimes like Node.js.

What is the difference between the JDK, JRE, and JVM?

The JVM is the virtual machine that runs Java bytecode. The JRE (Java Runtime Environment) bundles the JVM with the standard libraries needed to run programs, and the JDK (Java Development Kit) adds the compiler and other tools needed to write them.

Is Java still widely used?

Yes. Java remains one of the most widely used languages for backend and enterprise software, and it keeps gaining new features, such as records, pattern matching, and virtual threads, through regular releases.

Often compared

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings