From Java version 11 onwards, you can run simple Java code in a single source file without compiling it, just like you can run a Python or Bash script.
And that’s precisely what we will do in this high-speed Java programming course.
Note: If you are new to Java, follow these steps to get a first look at how to write Java code. However, note that this is not intended to be a complete introduction to the Java language, although you’ll get a good idea of the basic concepts. After all, Java can be used in many contexts for server applications, user interfaces, web development, mobile apps, embedded devices, and much more.
With this tutorial, you’ll get the basic idea of Java code, that is, the programming language, which will allow you to experiment and learn further.
Tip: All the example code is provided in the sections below and can be found on GitHub here:
github.com/foojayio/getting_started_with_java
If you haven’t checked that you have Java on your computer, go to Install Java. If everything’s OK and you’re ready to get started, select one or more of the topics below or simply start at the top.
11 steps, under 29 minutes in total
- Choosing an Editor1:07
Java Quick Start Tutorial: Learn how to choose the right Java editor or IDE for your workflow, from lightweight tools like VS Code to full-featured options such as IntelliJ IDEA, NetBeans, and Eclipse.
- Hello World!2:42
Java Quick Start Tutorial: Write and run your first Java program with a simple Hello World example, including the Java 25 shorthand syntax and the classic class-based approach.
- Using Arguments and String Arrays2:10
Java Quick Start Tutorial: Use the start-up arguments of the main method to learn Java arrays: their length, and how to loop through them.
- Working with Numbers2:08
Java Quick Start Tutorial: The Java number types you will actually use - int, float, double and long - and how to work with them.
- If, Then, Else3:14
Java Quick Start Tutorial: Compare values and branch on the result with if, then and else - the most-used construct in any programming language.
- Enum and Switch2:45
Java Quick Start Tutorial: Replace loose integer values with an enum, and use a switch to react to each of its options in Java.
- Using Methods2:32
Java Quick Start Tutorial: Split a Java program into methods to keep the code simple, readable and maintainable long after you wrote it.
- Using Objects4:07
Java Quick Start Tutorial: Java is object-oriented: turn part of your program into an object with its own variables and methods.
- Reading a Text File5:39
Java Quick Start Tutorial: Read a CSV file from disk in Java, combining files, loops and objects into one small working program.
- Using Streams2:53
Java Quick Start Tutorial: Streams, added in Java 8, let you chain steps over a collection. Extend the text-file example with filtering and mapping.
- What's Next?0:35
Java Quick Start Tutorial: You have the basics. Where to go next: beginner posts on Foojay.io, and free tutorials from the wider Java community.
Each section has a video demonstrating the example code, and the entire playlist is available on YouTube.
Sidenote: this tutorial is based on a section of the book “Getting Started with Java on the Raspberry Pi” by Frank Delporte.

Found a mistake, or something to add? Edit this page on GitHub