Welcome to the Java for Beginners course!
What do I need?
Before starting, please make sure you have Java installed and an IDE. If you don’t have these tools installed, feel free to check this tutorial for guidance. We’ll be using the 3 main tools mentioned in that tutorial for the rest of this beginners course.
Also, we recommend downloading the example project (see below for details) and importing it into your IDE.
How is the course organized?
The course is divided into separate chapters which you can find under the Contents section on the right hand side of this page (or at the bottom of the page if you’re accessing from a mobile device).
The first 3 chapters will introduce the basic building blocks you’ll need to know to start coding in Java and that will serve as a foundation for the rest of the courses.
If you are familiar with other programming languages then you might be familiar with either some of the concepts or even the syntax as Java shares a similar syntax with languages like C++. If that’s the case, feel free to skim/skip through the initial chapters.
Chapter 1: Introduces the concepts of variables, an initial look into classes, objects and packages and a first example on how to run a Java application.
Chapter 2: Covers the concepts of primitives and the basic operations in the Java language. NOTE: We omit Bitwise operations from this chapter, but will introduce them in a future course.
Chapter 3: Defines the difference between expressions and statements, and also introduces statements you can use to control the flow of the application.
Chapter 4: Our first example project. We introduce a small example project to put some of the topics in the first 3 chapters together.
Chapter 5: Covers Classes in more detail and introduces the concept of interfaces, inheritance and other OOP features available in Java.
Chapter 6: Introduces common object operations and base object behaviors.
Chapter 7: Defines arrays and provides an introduction to data structures.
Chapter 8: Provides an introduction to anonymous classes, lambdas and functional interfaces.
Chapter 9: Introduces the concept of streams and stream pipelines in Java.
Chapter 10: Provides examples and classes to handle Console-based Input and Output.
Chapter 11: Covers initial topics related to exception handling, the syntax of a try/catch block and the throw and throws statements.
In all of the chapters we’ll cover the concepts using an example-based approach, so you’ll find plenty of code examples that you can identify by
this font when they are in-lined, or by blocks of code like the one below:
String sample = "This is an example";
Where is the example project?
For this course, as we do in other tutorials and articles in this website, you’ll find a "GitHub" icon in every page inside the Table Of Contents header. If you are on a desktop/laptop, you’ll find this on the left-hand side of the page, or in mobile inside the Table of Contents icon as it’s hidden by default.
By clicking the GitHub icon you’ll be taken to the GitHub repository that contains the example code for the section/tutorial you’re reading.
All the projects we publish use Gradle as the build system, so importing them to an IDE should be very simple. If in doubt, check this tutorial for details on how to import the project into an IDE.
|The example project is a collection of examples used throughout the course put together in the same GitHub project for convenience of the reader. However, it shouldn’t be used as a reference project on how to design systems.|
What this course is not?
The main purpose of this course is to provide you with an understanding of the syntax of the Java language and give a basic ground for a beginner Java developer to be able to read and write Java code.
However, this course won’t focus on software design. We’ll introduce some concepts relevant to this but it isn’t the intention of this course.
What version of Java?
As this is a beginners course, most of the concepts can be applied to versions of Java ranging from the very old to the most recent. However, we aim to cover most of the concepts available in Java 8.
For concepts that are only available in Java versions 9 and above, we’ll highlight them as such.