- Java Tutorial
- What is Java?
- Installing the Java SDK
- Your First Java App
- Java Main Method
- Java Project Overview, Compilation and Execution
- Java Core Concepts
- Java Syntax
- Java Variables
- Java Data Types
- Java Math Operators and Math Class
- Java Arrays
- Java Strings
- Java Operations
- Java if statements
- Java Switch Statements
- Java for Loops
- Java while Loops
- Java Classes
- Java Fields
- Java Methods
- Java Constructors
- Java Packages
- Java Access Modifiers
- Java Inheritance
- Java Nested Classes
- Java Abstract Classes
- Java Interfaces
- Java Interfaces vs. Abstract Classes
- Java Enums
- Java Annotations
- Java Lambda Expressions
- Java Exercises
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.
Java Versions Covered in This Tutorial
The Java language and platform is constantly evolving, and is currently at version 8 (Java 8). Oracle intends for new Java versions to be released every 2 years. Thus, Java 9 is planned to be released in 2016, and Java 10 in 2018.
The Java versions covered in this Java tutorial trail are Java 6 + 7 + 8. Not all Java features are covered yet, but I keep adding to the tutorials.
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.
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
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.