JAVA TEACHER

ALL THE JAVA MATERIAL AND RESOURCES YOU NEED!

How to use this site

This site is not a sequential Java textbook. Instead, it is a Java and SQL encyclopedia.

There are two ways to get help.

  1. On the right, you will find the topics sorted by grades.
  2. On the top right you will find a search bar where you can search by keywords eg class diagram, rounding, tracetables, debug etc
  3.  This site is based on the Java by Example approach – less explanation and more examples. View or download the coded examples and study them, code them, run them, edit them, break them . . . this is how professional coders learn.
  4. There are two “Java by Example” textbooks that are a companion to this website. These textbooks offer an sequential learning experience grade by grade.

Steve Eilertsen – steve.eilertsen@gmail.com

Gr 12 – Date/time format

There are times when you need to present a stored value in a different format . . .  Real number example -  8.987578. Here you may prefer to say 8.99 Date example - "2018-1-1". Here you may prefer to say "1 January 2018" Java has a number of String formatting methods...

read more

Gr 12 – date/time text file

Reading records from a text file.Three class program creating an array of people objects - uses LocalDate class. Fields are as follows - First Name, Last Name, Date of Birth. NOTE: The date in the text file is in default date format for LocalDate i.e. "yyyy-MM-dd" ...

read more

Gr 11 – Date and time

We can use String for simple date-time tasks ie 23/05/2021 - we can use String methods like substring to extract information like date, month and year. When we need the current data and time from the system clock, or we need to do date/time arithmetic, we need...

read more

Gr 10,11,12 – Pause

There are times when we wish our Java code would run a lot slower e.g. when we want to count down from 10 to 0 with 1-second intervals. Here we can use "Thread.sleep(milliseconds)" see line 22 below. Note that the sleep period is not precise as your computer is...

read more

Gr 11 – Bare Bones 3 Class

Java - Three class template. In the grade 11 exam you are expected to write applications with at least three classes i.e. A UI class. Creates the manager class. Calls the methods it needs. May have some input and output. A manager class for all your methods. A...

read more

Gr 11,12 – JSON

JSON is a file format or text-based data structure that we can use with, or in place, of text files. JSON is intended to replace file format XML which you may have come across before. Here is a video explaining JSON Click here IT teacher Sandra De Lange shared this...

read more

Gr 11 – Switch Case Break

Complex "if-then-else" statements are needed when there are many options e.g. consider all the options in a menu. Fortunately, there is a better way when a lot of options are needed i.e. the "Switch-Case-Break" construct. It works exactly the same as "if-else" but its...

read more

Gr 12 – IT PAT IEB Everything

Grade 12 IT PAT IEB - Everything - Overview Your IEB IT PAT for grade 12 is made up of four phases. Phase One and Two are the data modelling phases. Phase Three is the coding and Phase Four the testing. Phase One – The project specifications. What your application...

read more

Gr 12 – All about SSD

New to the grade 12 2021 IT Theory syllabus is more up-to-date information about SSD ie SATA SSD and PCIe SSD. Also covers the form factor M.2 and NVMe, both SATA and PCIe. Here is an awesome YouTube video on the topic. All about SSD

read more

SEARCH BY CATEGORY