Java Programming Tutorial For Beginners – A Reboot

Welcome to Turreta’s The Java Programming Tutorial For Beginners. We designed this tutorial as a reboot with concise and easy-to-understand content.

Java Introduction

Java is an Oracle technology that is both a platform and a programming language. Read More.


How To Install Java Development Kit (JDK) On Windows

Setting up Java on your local machine is easy. You could use an installer or extract a zip format distribution. You don’t need an installer! Read More.


How To Write Your First Java Program

Before you can write your first Java program, you need to install an IDE! Read More.


Java Classes – The Blueprints And Building Blocks

Everything you do in Java revolves around classes, nothing else (well, kind of). Read More.


Java Object And Its Properties And Behaviors

Java objects can have properties and behaviors. Read More.


Java Classes And Access Modifiers

The best Java programmers have mastered the Java access modifiers in and out. Read More.


Java Interfaces And Access Modifiers

Read More


Java Generics

Read More

Java Formal Type Parameter Methods We Can Invoke

With Java Generics, we name Java Formal Type Parameter T, E, K, and V conventionally. If an instance of a Format Type Parameter, what available methods can we invoke on them? Read More.


Generic Classes

Read More


Generic Interfaces

There are three ways to implement Generic Interfaces. – Read More.


Primitives – The less-OOP side of Java

Java is not a 100% object-oriented programming language because of its primitives! – Read More.


Java Polymorphism – Java Is Formless And Shapeless

Read More


Java IO

Understanding How Java Works With Files

The Java java.io.File (File class for short) connects Java and the Operating System to read and write files. It can represent either a file or a directory. How files and directories are organized in the file system depends on the Operating System, which Java runs on. Read on.

How to Delete Files in Java without using third-party libraries

This post shows how to delete files in Java. Our codes will not use any third-party library to accomplish the task. Read on.

Java Stream API

The Java Stream API is only available in Java 8 and up.

Avoid NullPointerException with Stream.ofNullable in Java 9+

Love using the Java Stream API? It is cool but not bullet-proof. Also, it makes your codes less readable and NullPointerException exceptions hard to spot. We can avoid NullPointerException with Stream.ofNullable method.

Convert Iterator to Stream Using StreamSupport in Java 8+

Although not a common scenario, some libraries just return Iterators instead of Stream or Collection objects. Why? Because they can. Read on.

Java Certifications

Although it is best to keep your certifications up-to-date, you do not need to take the latest Java certifications, especially when the latest Java release is not significantly different from the Java version you got your certificate for. For example, you are certified in Java 8 but not in Java 14, the latest release.  On the other hand, if you are stuck in Java 1.4 certification, it is best to upgrade to the latest Java certification.

Java SE 8 Exam Preparations

Java Time API

Java Database Connectivity API

Connect Java to MySQL using JDBC

This post shows how to connect Java to MySQL using JDBC. Therefore, nothing fancy here. Just JDBC basics. Read on.

Java – Others

This subset of Java tutorials for beginners does not belong to any specific categories. Therefore, we listed them here.

Run Java Codes Before Application Shutdown

This post shows how to run Java codes before an application shutdown. We can use this idea to clean up resources, notify remote systems or display a farewell message before the application completes its execution or terminates. Read on.

Write Out XML Tags in Java using Lambda

This post shows how to write tags for huge XML files more conveniently using lambdas in Java. Read on.

How to skip and not execute the finally clause

They say that when an exception occurs, the finally clause, if available, will always execute no matter what except. That statement is not always true in real life.  This post shows how our Java codes can skip and not execute the finally clause. Read on.

Places in Java codes can we put the public static void main method

Many Java programmers are only familiar with having the public static void main in a class to start the application. However, there are other places where we can define this static method and still start up a Java application. This post shows where we can start up our application via, no less than the public static void main. Read on.

Convert JavaBean to XML Using XMLEncoder and XMLDecoder

This post shows how to use the Java classes XMLEncoder and XMLDecoder to convert JavaBean objects to XML and back. Read on.


Loading