thinking in java chapter 06