Simplify the Java example for chapter six a bit