No history yet

Introduction to Java

Meet Java

Java is a general-purpose programming language, meaning you can use it to build almost anything. It was created in the early 1990s by a team at Sun Microsystems led by James Gosling. Their goal was to create a language for smart consumer electronics, like interactive TVs.

Originally named "Oak" after a tree outside Gosling's office, the language was officially released in 1995 as Java. While it didn't take over the TV world as planned, it arrived just as the internet was booming. Its unique design made it perfect for the web and beyond.

Write Once, Run Anywhere

Java's most famous promise is "Write Once, Run Anywhere." This means you can write your Java code on one type of computer, like a Mac, and run it on a completely different one, like a Windows PC or a Linux server, without changing the code.

This magic is possible because of the Java Virtual Machine, or JVM. Think of the JVM as a universal translator. Instead of compiling your code directly for a specific computer, the Java compiler turns it into an intermediate form called bytecode. The JVM on any machine can then understand this bytecode and translate it into instructions the local machine can execute.

Java Code → Compiler → Bytecode → JVM → Runs on any computer

Thinking in Objects

Java is an object-oriented programming (OOP) language. This is a way of designing programs by modeling real-world things as 'objects'. An object bundles together related data and the behaviors that can act on that data.

To create objects, you first need a blueprint. In Java, this blueprint is called a class. A class defines the properties (data) and methods (behaviors) that all objects of its type will have. For example, you could have a Dog class. The properties might be breed and age, and the methods could be bark() and wagTail().

Class

noun

A blueprint or template for creating objects. It defines a set of properties and methods.

Once you have the Dog class, you can create individual Dog objects, each with its own specific breed and age. One object could be a 5-year-old Beagle, and another could be a 2-year-old Poodle. Both are Dog objects, built from the same blueprint, but they are distinct individuals.

Object

noun

An instance of a class. It is a concrete entity that has the properties and methods defined in its class.

Where Is Java Used?

For decades, Java has been a dominant force in the software world. Its stability, security, and scalability make it a top choice for a huge range of applications.

Many large-scale enterprise systems, the kind that power banks and e-commerce sites, run on Java. It's the primary language for developing native Android apps. It's also widely used in big data technologies, scientific computing, and embedded systems. Even video games like Minecraft were originally built using Java.

Lesson image

Here are just a few examples of where you'll find Java at work:

DomainExamples
Enterprise Web AppsBanking portals, retail sites (Amazon)
Mobile ApplicationsMost native Android apps (Google, Uber)
Big DataHadoop, Spark, Elasticsearch
Scientific ComputingMATLAB, financial modeling systems

Time to check what you've learned about Java's core concepts.

Quiz Questions 1/5

What was the original intended purpose for the Java programming language when it was created in the early 1990s?

Quiz Questions 2/5

What does Java's slogan "Write Once, Run Anywhere" refer to?

Understanding these core ideas about Java's history, platform independence, and object-oriented nature provides a solid foundation as you begin to explore the language itself.