SSJX.CO.UK
Content

Java Programming Guides

Below are guides to help you with your Java programming. They are all easy to understand with clear and complete examples. If you do not have Java JDK installed, click the following link to find out how to install Java on your computer!

How to use Java Arrays

Arrays

Creating and using fixed length arrays. Find out how combining them with for loops can make your programs easier to understand! The example is creating an array of lottery numbers.

How to use Java ArrayList

Array Lists

How to use Java's ArrayLists. These are dynamic arrays that you can add and remove items to. Like arrays, they can help simplify your code. The example is creating and adding to a list of planets.

Reading a text file

Files - Reading a Binary File

All New! 28/06/2026
How to safely read from a binary file. The example shows how to check that a bitmap file really is a bitmap file by reading the file header.

Reading a text file

Files - Reading a Text File

All New! 28/06/2026
How to safely read through a text file line by line after first checking it exists and then handling any problems.

How to use Java Methods

Methods

Methods (sometimes called functions) are self contained blocks of code that can help with code organisation and can be called multiple times reducing duplication. The example shows a method to calculate the area of a rectangle.

How to use Java Strings

Strings

Strings are one of the most commonly used data types, learn how to create and use them effectively! The example demonstrates creating and modifying strings.

How to correctly compare Java String

Strings - Comparing

This guide shows how to compare Strings the correct way using the equals method.

How to split Java Strings

Strings - Splitting

Splitting Strings is very useful, this page shows how to split a string of numbers and add them together. It also shows how to convert a String to a number and how an exception is raised if it fails.

Faster Strings with StringBuilder

StringBuilder

Find out how to use StringBuilder to join Strings faster and more efficiently. The example shows timings between joining Strings using the '+' and with StringBuilder. The StringBuilder method can be up to 100x faster!

Java Console Input

Console Input

Getting typed input from the user, also find out how to convert Strings to numbers. The example gets the age of the user and works out the year they were (probably) born in.

Updated (20/06/2026)