Programs from one of my books for java