Tech and Media Labs
This site uses cookies to improve the user experience.




Java Tutorial

Jakob Jenkov
Last update: 2018-02-15

Java was originally a programming language invented by Sun Microsystems (Sun was acquired by Oracle in January 2010). Since Java's invention it has become more than just a language. It is also a platform with a set of standard APIs and standard tools. Just exactly what Java has evolved into is covered in more detail in the next text in this tutorial, about what Java is today.

This Java tutorial trail (set of articles) describes the Java programming language. The intention of this tutorial is mostly to be a compressed introduction to Java for developers who already know a bit about programming and object oriented concepts. I will try to explain the various different concepts as I use them, but a bit of programming background will helpful.

The target audience for this Java tutorial is both beginners who need to learn Java almost from scratch, and more experienced developers who just need to catch up on features they haven't used.

Java Versions Covered in This Tutorial

The Java language and platform is constantly evolving, and is currently at version 9 (Java 9). New versions of Java are released regularly, sometimes several with years in between, sometimes faster. I keep updating this Java tutorial with new features whenever I have time for it.

This particular tutorial trail only covers the core Java language features. It does not cover the Java APIs. Many of the Java APIs are covered elsewhere on this tutorial site.

If you are just looking for what is new in each Java version, the following sections will list the main additions to the latest Java versions.

New in Java 7

The main new features in Java 7 are:

New in Java 8

The main additions to Java 8 are:

New in Java 9

The main additions to Java 9 are:

  • Java Modules

Get Started Learning Java

This page is merely an introduction to the Java tutorial trail. The real explaining starts from the next text (page) in the trail, What is Java? . You can see all the articles in this tutorial on every page, in the top left part of each page.

As you read the tutorials I would recommend that you play around with code examples etc. Personally, I learn better when I type in examples and run them. In order to do this, you need to:

  • Write the Java code
  • Compile the Java code
  • Execute the compiled Java code

The easiest way to do these three steps is to use a Java IDE (Integrated Development Environment). You can edit the Java code, compile it and execute it, all from within the IDE. There are three popular Java IDE's available:

Both Eclipse and Netbeans are free, and IntelliJ IDEA has a free community edition which is just fine when you start learning Java. Personally I use IntelliJ IDEA, but I have used all three IDEs from time to time. All of them will be fine for you to start out with.

If you do not want a full IDE, you can write Java code in a standard text editor, like Notepad (on Windows) or Notepad++ (free text editor). Java file names have to end with the .java extension. You can then compile the Java files into Java byte code, and use the java command to run the compiled byte code.

In order to compile and execute Java code this way, you need to download and install the Java SDK (Java Software Development Kit). Just click on this link: Java 8 from Oracle. Download the SDK, and install it. Once the Java SDK is installed, you can compile and run Java programs. How all this is done is explained in more detail in later texts.

Feel Free to Contact Me

If you disagree with anything I write here in this Java tutorial, or just have comments, questions, etc, feel free to send me an email. You wouldn't be the first to do so. You can find my email address on the about page.

Jakob Jenkov




Copyright  Jenkov Aps
Close TOC