Nepedia
Back to Discover
Advanced Reader
💻

Java (programming language)

technology Maturity 7-9 Next article →

Java is a high-level, general-purpose programming language. It is also known as an object-oriented language. This means it organizes software design around data, or objects, rather than functions and logic. Java is designed to be memory-safe. This helps prevent many common errors that can cause programs to crash. One of its most important features is its portability. Developers follow a principle called "write once, run anywhere," or WORA. This allows code to run on many different platforms without being rewritten.

JavaUniverse
JavaUniverse

To achieve this portability, Java uses a unique execution process. Instead of compiling code directly into machine code for a specific computer, it uses an intermediate step. The programmer's code is compiled into something called Java bytecode. Bytecode is a set of instructions that is not tied to any specific hardware. To run this bytecode, a device needs a Java virtual machine, or JVM. The JVM acts as a translator. It reads the universal bytecode and converts it into the specific machine language of the host computer.

JavaUniverse
JavaUniverse

Because interpreting bytecode can be slow, Java uses a tool called a Just-in-Time (JIT) compiler. This compiler translates bytecode into machine code while the program is actually running. This helps the software execute with much higher performance. Java also manages computer memory automatically through a process called garbage collection. In some languages, programmers must manually clear out old data from the memory. In Java, the runtime environment identifies when an object is no longer being used. The garbage collector then automatically recovers that memory. This prevents many errors, though programmers must still be careful not to keep unnecessary references to objects.

JavaUniverse
JavaUniverse

Java is organized into different editions for specific tasks. Java Platform, Standard Edition, or Java SE, is used for workstation environments. Java Platform, Enterprise Edition, or Java EE, is built for large internet and distributed environments. Java Platform, Micro Edition, or Java ME, is optimized for devices with limited resources. There is also Java Card, which is designed for smart-cards.

JavaUniverse
JavaUniverse

The history of Java began in June 1991. James Gosling, Mike Sheridan, and Patrick Naughton started the project at Sun Microsystems. They originally called the language "Oak" after a tree outside Gosling's office. They later changed the name to Java, which comes from coffee grown in Indonesia. The project was first intended for interactive television. However, the digital cable industry was not ready for such advanced technology at the time. Sun released the first public version, Java 1.0, in 1996.

James Gosling 2008
James Gosling 2008

Java has changed hands over the years. Sun Microsystems released much of the JVM as free, open-source software in 2007. In 2010, Oracle Corporation bought Sun Microsystems. Oracle now acts as the steward of the technology. While Oracle provides its own HotSpot JVM, the official reference implementation is the OpenJDK JVM. OpenJDK is open-source software used by most developers. It is also the default JVM for almost all Linux distributions.

James Gosling 2008
James Gosling 2008

Java remains a massive part of the computing world. It runs on everything from laptops and game consoles to scientific supercomputers and data centers. It was once ranked as the third most popular programming language on GitHub. Developers often rely on Long-Term Support (LTS) versions for stability. Current LTS versions include Java 8, 11, 17, 21, and 25. These versions receive regular maintenance and updates. As of now, Java 26 is the current version.

Duke (Java mascot) waving
Duke (Java mascot) waving
565 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:Duke (Java mascot) waving.svg
Duke (Java mascot) waving.svg
File:James Gosling 2008.jpg
James Gosling 2008.jpg
File:JavaUniverse.png
JavaUniverse.png
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.