thinking in java chapter 07