C O N T E N T S

Start here

Introduction - some terms

What is Java?

Compilation vs interpretation

Java is...

Java versions

Packages: huge number available

Java development tools

Java commands/utilities

JDK API documentation

Java Enterprise APIs (Java EE)

Where and why to use Java

A simple application

Let's make a program

Exercise 1 - Squarer

How does Squarer work?

Fundamental syntax

Primitive data types in Java

Exercise 2 - Squarer failure

Identifiers, variables and constants

Casting

Escape characters

Operators

Statements and local variables

Assignment statements

Conditional statements (1) - if

Exercise 3 - Squarer7

Conditional statements (2) - switch

Exercise 4 - days of the week

Loop statements (1) - while

Loop statements (2) - for

Exercise 5 - for loops

More about loops

Methods

Exercise 6 - method

Objects and classes

OO = Object Oriented

Classes

Some relationships between classes

Exercise 7 - class Rectangle

static

Packages

The standard API and its documentation

Classes corresponding to the primitive types

Exercise 8 - Point

Values, references and null

Arrays

Copying and comparing objects

java.lang.String

Matching patterns in strings

java.lang.StringBuffer

Files & directories

Exercise 9 - FileLister

Inheritance

this, this () & more about constructors

The class called Object

Throwing exceptions

Exercise 10 - Exception handling

File input & output

Exercise 11 - CSV to HTML

Regular expressions

The instanceof operator

Exercise 12 - instanceof

Interfaces (multiple inheritance)

Exercise 13 - shapes

Creating packages

Exercise 14 - make a package

Access modifiers

JAR files

Beware of the classpath!

Comments for javadoc

Exercise 15 - javadoc

Exercise 16 - starting NetBeans

Advanced syntax

Lists, iterators, generics, for-each loops

Exercise 17 - sorted lines

enum

Annotations

More new things from Java 5

The class called Class

Static blocks

Inner classes

Threads

Exercise 18 - thread demo's

Exercise 19 - avoid this bank!

Synchronisation

Exercise 20 - the bank again

More on generics

Methods inherited from Object

Exercise 21 - Product

Object serialisation

Data structures

Comparing objects for sorting

Java SE Collections Framework

The singleton pattern

Exercise 22 - Order

Synchronising collections and maps

Properties

Assertions

Graphical User Interfaces

GUI = Graphical User Interface

Exercise 23 - a window

JOptionPane - common dialogues

Exercise 24 - GUI Squarer

javax.swing.JFileChooser

Pluggable look and feel

Exercise 25 - GUI CSV to HTML

Graphics context

javax.swing.JFrame

Exercise 26 - Sheet

Load, draw & save images

Some windows & controls in swing

Events

Exercise 27 - freehand drawing

Layout managers

javax.swing.JButton

JScrollPane & JTabbedPane

Swing & threads - starting a GUI application

Applets

Exercise 28 - applet

Better OO design

OO = Object Oriented...

Inheritance can be bad for you

Getters and setters

Exercise 29 - OrderCode

Unit testing

Unit testing with JUnit and EasyMock

Testing with JUnit

Exercise 30 - IntegerTest

Further unit testing guidelines

Exercise 31 - age

Dependence on other objects

Stubs and mocks

EasyMock

Exercise 32 - Customer

Using mock objects fully

Exercise 33 - order references

More flexible expectations

EasyMock class extension

Static methods

Age revisited

Exercise 34 - Order

End of course