WELCOME xxix
CHAPTER 1: INTRODUCING JAVA 1
CHAPTER 2: PROGRAMS, DATA, VARIABLES, AND CALCULATION 27
CHAPTER 3: LOOPS AND LOGIC 71
CHAPTER 4: ARRAYS AND STRINGS 113
CHAPTER 5: DEFINING CLASSES 165
CHAPTER 6: EXTENDING CLASSES AND INHERITANCE 221
CHAPTER 7: EXCEPTIONS 279
CHAPTER 8: UNDERSTANDING STREAMS 309
CHAPTER 9: ACCESSING FILES AND DIRECTORIES 335
CHAPTER 10: WRITING FILES 365
CHAPTER 11: READING FILES 415
CHAPTER 12: SERIALIZING OBJECTS 451
CHAPTER 13: GENERIC CLASS TYPES 469
CHAPTER 14: THE COLLECTIONS FRAMEWORK 517
CHAPTER 15: A COLLECTION OF USEFUL CLASSES 565
CHAPTER 16: THREADS 619
CHAPTER 17: CREATING WINDOWS 661
CHAPTER 18: HANDLING EVENTS 733
CHAPTER 19: DRAWING IN A WINDOW 787
CHAPTER 20: EXTENDING THE GUI 845
CHAPTER 21: FILING AND PRINTING DOCUMENTS 913
CHAPTER 22: JAVA AND XML 969
CHAPTER 23: CREATING AND MODIFYING XML DOCUMENTS 1031
APPENDIX A: KEYWORDS 1077
APPENDIX B: COMPUTER ARITHMETIC 1079
INDEX 1085