## Introduction to Programming Using Java, Eighth Edition

## Version 8.1.1, May 2020

(Minor update of Version 8.0 from December 2018;
very minor update of Version 8.1 from July 2019)

#### Author: David J. Eck (eck@hws.edu)

| WELCOME TO the Eighth Edition of Introduction to Programming Using Java, a free, on-line textbook on introductory programming, which uses Java as the language of instruction. This book is directed mainly towards beginning programmers, although it might also be useful for experienced programmers who want to learn something about Java. It is not meant to provide complete coverage of the Java language. The eighth edition requires Java 8 or later, and it uses JavaFX for GUI programming. Version 8.1 is a small update of Version 8.0. This version briefly covers some of the new features in Java 11 and makes it clearer how to use this book with Java 11 and later. Earlier editions of the book are still available. See the preface for links to older editions. You can the download this web site for use on your own computer. PDF, e-book, and print versions of the textbook are also available. The PDF that includes links might be the best way to read it on your computer. Links to the downloads can be found at the bottom of this page. Readers are strongly encouraged to try out the sample programs as they read the book! You can download the source code separately or as part of the web site using the links below. See the README file for information about how to compile and run the examples. ### Short Table of Contents: Full Table of Contents Preface Chapter 1: Overview: The Mental Landscape Chapter 2: Programming in the Small I: Names and Things Chapter 3: Programming in the Small II: Control Chapter 4: Programming in the Large I: Subroutines Chapter 5: Programming in the Large II: Objects and Classes Chapter 6: Introduction to GUI Programming Chapter 7: Arrays and ArrayLists Chapter 8: Correctness, Robustness, Efficiency Chapter 9: Linked Data Structures and Recursion Chapter 10: Generic Programming and Collection Classes Chapter 11: Input/Output Streams, Files, and Networking Chapter 12: Threads and Multiprocessing Chapter 13: GUI Programming Continued Source Code for All Examples in this Book Glossary News and Errata ©1996--2020, David J. Eck. This work is licensed under a Creative Commons Attribution-Noncommercial-ShareAlike 4.0 License. (This license allows you to redistribute this book in unmodified form for non-commercial purposes. It allows you to make and distribute modified versions for non-commercial purposes, as long as you include an attribution to the original author, clearly describe the modifications that you have made, and distribute the modified work under the same license as the original. Permission might be given by the author for other uses. See the license for full details.) This book is available for downloading and for on-line use at the Web address: http://math.hws.edu/javanotes/ ### Downloading And Other Links Full Web Site Download: http://math.hws.edu/eck/cs124/downloads/javanotes8.zip — This "zip" archive contains a complete copy of the web site. It should be usable on almost any computer. Size: 5.6 Megabytes. Source Code Downloads: http://math.hws.edu/eck/cs124/downloads/javanotes8-example-programs.zip — A zip archive of the "source" directory from the web site, which includes source code for sample programs from the text. Note that if you download the complete web site, then you already have a copy of the same source directory. See the README file. Size: 1.4 Megabytes. http://math.hws.edu/eck/cs124/downloads/javanotes8-exercise-solutions.zip — A zip archive containing source code for all the end-of-chapter exercises. These have been extracted from the web pages that contain the solutions as a convenience. They are not included in the web site download. See the README file. Size: 922 Kilobytes. PDF Downloads: http://math.hws.edu/eck/cs124/downloads/javanotes8-linked.pdf — a PDF version with internal links for navigation and external links to source code files, exercise solutions, and other resources that are not included in the PDF. Recommended for on-screen reading. Size: 6.7 Megabytes; 757 pages. http://math.hws.edu/eck/cs124/downloads/javanotes8.pdf — a PDF version without links, more suitable for printing. Size: 6.1 Megabytes; 763 pages. E-book Downloads. http://math.hws.edu/eck/cs124/downloads/javanotes8.mobi, for Kindle. http://math.hws.edu/eck/cs124/downloads/javanotes8.epub, for most other ebook readers. These should be considered experimental. Depending on the particular ebook reader that you use, there can be problems with rendering of long lines in program code sample. You might find that lines that are too long to fit across your screen are incorrectly split into multiple lines, or that the part that extends beyond the right margin is simply dropped. On some readers, you might be able to scroll horizontally to see the hidden text. The ebooks include answers to quizzes and exercises but do not include source code for sample programs; the sample programs can be downloaded separately, above. Print Version Available from Lulu.com: Printed version — I have made this book available for purchase in printed versions from the print-on-demand publisher lulu.com. This is for convenience only, for those who would like to have a bound printout in a nice form. (Please do not feel obliged to buy the printed version; I do not make any money from it!) The entire book is available in a thick and somewhat unwieldy 740-page printed version: Introduction to Programming Using Java. It is also available in two parts: Chapters 1 through 7, and Chapters 8 through 13. (The printed version is 8.1, not 8.1.1.) Source Files for the Book Complete Sources — The complete source files that are used to produce both the web site and PDF versions of this book are available for download, but will be useful only to a very limited audience. See the end of the preface for more information and a link.

(19 May 2020, Version 8.1.1 Released)
(2 July 2019, Version 8.1 Released)
(5 December 2018, Version 8 Released)