Trace Id is missing
Skip to main content
A person playing with game controller on laptop.

What is Java?

A Beginner's Guide to Java | Microsoft Azure.

A person holding a mobile and a laptop is open on the table

What is Java?

Java is a multiplatform, object-oriented programming language that runs on billions of devices worldwide. It powers applications, smartphone operating systems, enterprise software, and many well-known programs. Despite having been invented over 20 years ago, Java is currently the most popular programming language for app developers.

Here are the traits that defined Java programming language and made it so ubiquitous. Java is:

Multiplatform: Java was branded with the slogan "write once, run anywhere" (or WORA), and that still holds true today. Java programming code written for one platform, like the Windows operating system, can be easily transferred to another platform, like a mobile phone OS, and vice versa without being completely rewritten. Java works on multiple platforms because when a Java program gets compiled, the compiler creates a .class bytecode file that can run on any operating system that has the Java virtual machine (JVM) installed on it. It's typically easy to install JVM on most major operating systems, including iOS, which was not always the case.

Object-oriented: Java was among the first object-oriented programming languages. An object-oriented programming language organizes its code around classes and objects, rather than functions and commands. Most modern programming languages, including C++, C#, Python, and Ruby are object-oriented.

These traits make Java a versatile and relatively easy-to-learn programming language that's extremely popular with software and technology companies. If you're seeking a career in coding or computer programming, knowing how to write Java is a valuable skill.

When was Java created?

Java was invented by James Gosling in 1995 while he was working at Sun Microsystems. Though it quickly gained popularity after its release, Java didn't start out as the powerhouse programming language it is today.

A person writing code in his MacBook pro

Development on what would become Java began at Sun Microsystems in 1991. The project, initially called Oak, was originally designed for interactive television. When Oak was deemed too advanced for the digital cable technology available at the time, Gosling and his team shifted their focus to creating a programming language and renamed the project Java, after a type of coffee from Indonesia. Gosling saw Java as a chance to address problems he anticipated were on the way for less portable programming languages as more devices became networked.

Java was designed with a syntax style similar to the C++ programming language so that it would already be familiar to programmers when they started using it. With the slogan "write once, run anywhere" at its core, a programmer could write Java code for one platform that would run on any other platform that had a Java interpreter (i.e., Java virtual machine) installed. With the emergence of the internet and proliferation of new digital devices in the mid 1990s, Java was quickly embraced by developers as a truly multiple platform programming language.

The first public version of Java, Java 1.0, was released in 1996. Within five years, it had 2.5 million developers worldwide. Today, Java powers everything from the Android mobile operating system to enterprise software.

A person looking at multiple monitors on his table and using mouse to navigate

What is the Java programming language used for?

Java is an extremely transferable programming language used across platforms and different types of devices, from smartphones to smart TVs. It's used for creating mobile and web apps, enterprise software, Internet of Things (IoT) devices, gaming, big data, distributed, and cloud-based applications among other types. Here are some specific, real-world examples of applications that are programmed with Java.

Mobile apps

Many, if not most, mobile applications are built with Java. Java is a preferred language of mobile app developers because of its stable platform and versatility. Popular mobile apps coded in Java include Spotify, Signal, and Cash App.

Web apps

A wide variety of web applications are developed using Java. Twitter and LinkedIn are among the most well-known.

Enterprise software

Enterprise software is software intended to serve a large group or organization. It includes software like billing systems and supply chain management programs. Java's high scalability makes it an appealing language for developers writing enterprise software.

Games

Popular games written in Java programming language include the original Minecraft and RuneScape.

IoT applications

IoT applications are everywhere—smart TVs, cars, heavy machinery, work facilities, and beyond—and Java is used to program many of them. Java is a popular choice for IoT developers because of how easily its code can be transferred between platforms.

What is JavaScript and how is it different from Java?

Unlike Java, JavaScript has a single function: creating scripts to run web browsers. These scripts are all over the internet. They're used for browser-based games, webpage animations, user behavior logging, and pop-up ads, among other things. Basically, anything that updates on a website without someone reloading the page is most likely JavaScript.

Java, as we've covered, is used for much more than websites.

A person looking at his laptop screen placed on the table

How does Java work?

As explained earlier, Java is a multiple platform programming language. This means that it can be written for one OS and run on another. How is this possible?

Java code is first written in a Java Development Kit, which are available for Windows, Linux, and macOS. Programmers write in the Java programming language, which the kit translates into computer code that can be read by any device with the right software. This is achieved with a piece of software called a compiler. A compiler takes high-level computer code like Java and translates it into a language that operating systems understand called bytecode.

Bytecode is then processed by an interpreter called a Java virtual machine (JVM). JVMs are available for most software and hardware platforms, and this is what allows Java code to be transferred from one device to another. To run Java, JVMs load the code, verify it, and provide a runtime environment.

Given Java's high portability, it's no wonder many people want to learn how to write it. Luckily, there are a lot of resources available to get started learning Java.

Learn Java programming

So, what does Java mean for beginning programmers? In terms of being a worthwhile investment to learn: a lot. Despite the fact that it's been around for over 20 years, it remains a top programming language because:

  • Java is exceptionally versatile, being used across many different industries and operating systems—and the Android operating system is based on it.
  • Java is straightforward to learn and is considered a great first language for learning the fundamentals of programming.
  • Java tutorials, bootcamps, and online communities are easy to find—it's easy to get started and to get ongoing support as you become more experienced with Java.

It can be helpful to think about learning Java in two stages: First, learning how to actually program in Java, and second, learning how to use the language in different development environments. This is relevant because even Java experts need to learn how to use the Java tools and frameworks they're familiar with in different places.

Check out these learning resources for both beginners and experts.

Java tutorials for beginners

Microsoft Learn: Java for Beginners

This three-part series of short videos for beginning Java programmers starts with Java basics and then gets you started working with Java strings, classes and packages, and methods and modules.

Microsoft Learn: Cheat sheets for Java developers

These cheat sheets provide quick references for Java and related technologies, including Java language, JVM options, Spring annotations, Maven, Gradle, IntelliJ, and Git.

Udemy: Learn Java Programming – Beginner to Master

This paid, 61.5-hour, on-demand certificate course provides a thorough grounding in Java, including covering concepts like multithreaded and GUI programming.

Educative: Learn Java from Scratch

This free, 12-hour, interactive Java tutorial starts with a basic "Hello world!" lesson, progresses through fundamental programming concepts, and concludes with an assessment exam.

Coursera: Java Programming and Software Engineering Fundamentals Specialization

This paid, five-month certificate course teaches beginners Java programming for Java SE, along with the fundamentals of software engineering.

Java tutorials and resources for advanced users

Java blog

Get news, updates, and insights for developing with Java in this blog by Java developers, for Java developers.

Java development with Microsoft

Explore Java-specific SDKs, APIs, extensions, the OpenJDK, and advanced learning resources to get the most out of Java.

Java on Azure

Find what you need to start developing and modernizing enterprise Java apps on Azure, including support for Java EE, Spring Boot, and Kubernetes.

Get started with Java on Azure

Learn how to build, migrate, and scale Java apps—while using the Java tools and frameworks you already know—with Azure services.

Frequently asked questions

  • Java is a popular multiple platform, object-oriented programming language. Java can be used as a platform through Java virtual machines (JVMs), which can be installed on most computers and mobile devices.

  • Java was created by James Gosling in 1995 while he was working at Sun Microsystems. Development of Java began in 1991, and the first public version was released in January 1996.

  • Yes, Java is a programming language that powers apps, smartphone OSs, enterprise software, and many other, well-known programs.

  • The Java programming language is used across platforms and devices, due to its easily transferable code. Popular uses of Java include enterprise software, mobile app development, web apps, cloud-based applications, games, and IoT applications.

  • Java is an extremely versatile programming language. It can be used to program software and applications for many different operating systems and devices, including IoT devices, mobile phones, and computers.

  • Java code is processed through a compiler, which translates it into bytecode that an operating system reads. Bytecode from Java is processed by a Java virtual machine, which verifies the code and provides a runtime environment for Java apps.

  • There are many options outside of traditional schooling to learn Java. Coursera, Udemy, and many other companies offer Java certificates that can be completed in less than 6 months. There are also free tutorials, videos, and courses available online.

Start developing with Java on Azure for free

Get popular services free for 12 months and 40+ other services free always—plus $200 credit to use in your first 30 days.

Explore all Microsoft resources for Java

Learn how to create and deploy Java applications and services using Microsoft technologies.