thinking in java chapter 05