Java Top

Get started with Spring 5 and Spring Boot 2, through the Learn Spring course:

> CHECK OUT THE COURSE

1. Overview

Java is one of the most popular programming languages worldwide. It was created by James Gosling and Patrick Naughton, employees of Sun Microsystems, with support from Bill Joy, co-founder of Sun Microsystems.

Sun officially presented the Java language at SunWorld on May 23, 1995. Then, in 2009, the Oracle company bought the Sun company, which explains why the language now belongs to Oracle.

In this article, we'll explore the history of the Java programming language.

2. What Is Java?

Java is described as being a multi-purpose, strongly typed, and Object-Oriented Programming (OOP) language. By design, it has as few implementation dependencies as possible.

With this programming language, we can create applications on multiple devices. Its scope is very wide, allowing us to create software for mobile devices, point of sale terminals, ATMs, IoT (Internet of Things), as well as web pages.

Although Kotlin is the preferred language for Android development in 2021, Java is still the default language for developing apps for Android. The big reason for that is Android's tight integration with Java. In fact, parts of that OS, like the UI and specific core libraries, are written in Java.

3. Brief History

Let's dive in to take a look at how the Java project started and evolved through time.

3.1. The Beginning

The project was born in 1991, behind the scenes of a Sun Microsystems team, when three engineers, James Gosling, Mike Sheridan, and Patrick Naughton sought to design a language applicable to small electrical devices.

Soon after, they launched the Green Project to study the impact of convergence between digitally controlled home appliances and computers.

Using a syntax similar to that of C++, they made a digital remote control, equipped with a graphic and animated touch screen. The fruit of several months of intense research, this remote control had the fantastic feature of controlling a whole living room equipment. It was programmed in a new language, completely independent of the processor it was running on, making the remote one-of-a-kind.

Ultimately, it was James Gosling, one of the members of the Green Project, who originated this new language, which he called Oak.

Afterward, the project gained ground when American cable operators joined the project. Oak then became FirstPerson. Unfortunately, the FirstPerson project had no commercial success, as it was certainly too far ahead of the industry, whose priority was, above all, profitability.

3.2. The Arrival of the HTTP Protocol and the Mosaic Browser

In 1993, the HTTP protocol and the Mosaic browser arrived, which was a crucial event for the project. During this time, the team realized that the Internet would be the ideal network to position their product.

Then, in 1995, James Gosling unveiled a browser called WebRunner that was capable of showing HTML content mixed with Applets. Things took off from there. First, WebRunner became HotJava, then java.sun.com officially opened to the public.

Eventually, the name of this technology would become “Java” (meaning “coffee” in American slang), in honor of the programmer's favorite drink, namely coffee, part of the production of which comes from the island of Java.

It was then that Sun and Netscape announced their desire to integrate this new technology into their browsers, which definitively launched the language. The versions would then follow one another from version 1 in 1996 to version 17 in 2021.

4. Features

Thanks to its excellent features, Java has become a popular and useful programming language. Sun characterized it as being:

  • Compiled and Interpreted
  • Platform Independent and Portable
  • Object-Oriented
  • Robust and Secure
  • Distributed
  • Familiar, Simple and Small
  • Multi-threaded and Interactive
  • High Performance
  • Dynamic and Extensible

Source: “Programming with Java” – E Balagurusamy.

Next, we'll detail each of these features.

4.1. Compiled and Interpreted

Java combines the power of compiled languages with the flexibility of interpreted languages.

The compiler (javac) compiles the source code into bytecode, then the Virtual Machine (JVM) executes this bytecode by transforming it into machine-readable code.

4.2. Platform Independent and Portable

The two-step compilation process is what lies behind Java's most significant feature: platform independence, which allows for portability.

Being platform-independent means a program compiled on one machine can be executed on any other machine, regardless of the OS, as long as there is a JVM installed.

The portability feature refers to the ability to run a program on different machines. In fact, the same code will run identically on different platforms, regardless of hardware compatibility or operating systems, with no changes such as recompilation or tweaks to the source code.

4.3. Object-Oriented

Java strongly supports Object-Oriented Programming concepts such as encapsulation, abstraction, and inheritance.

All the instructions and data in a Java program have to be added inside a class or object.

4.4. Robust and Secure

Java includes several useful features that help us write robust and secure applications.

One of the most important ones is the memory management system, along with automatic garbage collection. Compared to languages like C/C++, Java avoids the concept of explicit pointers, and doesn't require programmers to manually manage the allocated memory.

Instead, the GC will take care of deleting unused objects to free up memory.

In addition, Java is a strongly-typed language, which is a feature that can help lower the number of bugs in an application, and provides error handling mechanisms.

4.5. Distributed

This feature is helpful when we develop large projects. We can split a program into many parts and store these parts on different computers. As a result, we can easily create distributed and scalable applications that run on multiple nodes.

We can achieve this using the concept of RMI (Remote Method Invocation) and EJB (Enterprise JavaBeans).

4.6. Simple and Familiar

First, Java is simple thanks to its coding style, which is very clean and easy to understand. Also, it doesn’t use complex and difficult features of other languages, such as the concept of explicit pointers.

Finally, Java is familiar since it's based on existing languages like C++ and incorporates many features from these languages.

4.7. Multi-Threaded and Interactive

Also known as Thread-based Multitasking, multithreading is a feature that allows executing multiple threads simultaneously.

In short, we can write Java programs that deal with many tasks at once by defining multiple threads. The advantage of multithreading is that it doesn't occupy memory for each thread – all threads share a common memory area.

4.8. High Performance

Bytecodes that the compiler generates are highly optimized, so the Virtual Machine can execute them much faster. This is why Java is faster than other traditional interpreted programming languages.

4.9. Dynamic and Extensible

This feature gives the facility of dynamically linking new class libraries, methods, and objects. Java is highly dynamic as it can adapt to its evolving environment.

5. Usefulness of Java Runtime Environment

To be able to run a software application, it must have an environment that allows it to function – typically, an operating system such as Linux, Unix, Microsoft Windows, or macOS. In the absence of other supporting environments, programs are limited by the capabilities of the operating system and its resources.

The Java Runtime Environment (JRE) acts as a translator and facilitator between the program and the operating system. It runs on top of the operating system to provide additional Java-specific resources.

6. Conclusion

Through all its specificities, the Java language synthesizes a large part of other existing languages' possibilities while erasing some of their main faults.

It is, therefore, a language commonly recognized as being relatively modern, and whose potential is well established.

Java bottom

Get started with Spring 5 and Spring Boot 2, through the Learn Spring course:

>> CHECK OUT THE COURSE
Generic footer banner
1 Comment
Oldest
Newest
Inline Feedbacks
View all comments
Comments are closed on this article!