Code samples from Cay Horstmann's book