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 – The Law

The South Africa SAGS (syllabus) for IT specifically mentions 4 pieces of legislation in the Social and Ethical Issues part of the syllabus.  Here below is a overview of each taken from Google . . .  The Protection from Harassment Act This provides a legal remedy for...

read more

Gr 11 Elegant Code

Elegant Java code is a thing. Ask any straight-A coding student who has tried to help a non-performing class mate. "Bad" code is difficult to understand. By contrast elegant code is easy, quick and a breeze to troubleshoot. So what makes elegant code? It starts with...

read more

Gr 10 – Reading text file

If you use a "one class, one main method" approach to grade 10 Java, this is a good end-of-year exercise revising the work done during the year. This program reads in a text file of "learner houses" and "money raised". It totals the amount raised per house, and then...

read more

Gr 10 – All about loops

Here are 8 looping Java programs in a Notepad ++ format. They feature the "for loop" and the "while loop". Some run and some do not and some are infinite loops. Click here for the code Class Loops with not run because when using JOptionPane the input arrives as a...

read more

Gr 12 – Theory revision

Theory revision, overviews and cheatsheets for your IEB Theory tests and exams (2022). There is a lot here, notes that I have prepared and notes that matric students have prepared in previous years - some may be more useful than others. Choose that ones that will help...

read more

Gr 11 12 Not !

In Java "not" is a bit awkward when used with a String method like "equals" if (name.equals("steve") {    } is easy to understand. If the name equals "steve" then execute the code block that follows. What about if the name does not equal steve? if ( !...

read more

Gr 11 – Switch Case

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 OOP theory prac notes

Here are Java OOP theory summary notes and Java OOP practical notes. These notes are not my own but were given to me by one of my students so I do not know who the original author is OOP theory OOP practical

read more