Introduction to Programming Using Java, Eighth Edition
News and Errata
News for the Eighth Edition of This Book
- December 29, 2020 — Version 8.1.2 is released. This small update fixes a few errors, adds very short introductions to two new Java features (text blocks and records), and updates the information about programming environments in Section 2.6.
- May 19, 2020 — Version 8.1.1 is released. This is a really tiny update, released for the web and PDF versions of the book only. The main motivation was a change in the links to the print versions at lulu.com. I also updated Section 2.6 to reflect the fact that the current version of Java is Java 14, and Subsection 3.6.5 to say that the new switch statement syntax is now an official part of the language.
- July 2, 2019 — Version 8.1 is released. This is a minor update whose main purpose is to make it clearer how to use the book with Java 11 and JavaFX. The major changes are in Section 2.6. A few short topics from Java 11 and Java 12 have also been added. The main web address for the book, http://math.hws.edu/javanotes, now points to the eighth edition.
- May 15, 2019 — The lab assignments from my Spring 2019 Intermediate Programming course, using Chapters 8 through 13 of the eighth edition, can be found at http://math.hws.edu/eck/cs225/.
- December 5, 2018 — The official release of the Eighth Edition. Once again, I am indebted to John Ganci, who contributed many corrections to the "beta" version of this edition.
- August 19, 2018 — A "final beta" version of the Eighth Edition is available for browsing on the web and for download. The official release of the Eighth Edition will take place some time after Java 11 is released.
Errata for Version 8.1
This is a list of substantive errors that have been found in Version 8.1.
- Section 2.5: A reader wrote to point out some errors in the description of Java
expressions in Section 2.5. The statement in Subsection 2.5.3 that said
x == Double.NaNand
x != Double.NaNare both
falsein all cases is not correct. In fact,
x == Double.NaNis defined to be false in all cases, and
x != Double.NaNis defined to be
truein all cases. Also, Subsection 2.5.6 incorrectly said that there is an assignment operator
&&=. There is no such operator. [Fixed in version 8.1.2.]
- Section 2.6: In the last paragraph of Subsection 2.6.7,
"For example, if a program is in a package named
text.pkg" should be "For example, if a program is in a package named
test.pkg". [Fixed in version 8.1.2.]
- Source file Random.java for Chapter 3: The comments on this file were not updated from an earlier version and did not correctly describe the program. [Comments are corrected in version 8.1.2.]
- Section 4.4: At the start of the sample program ThreeN2 in Subsection 4.4.3,
input textio.TextIOshould be
import textio.TextIO. [Fixed in version 8.1.2.]
- Section 7.5: In the illustration of a symmetric matrix in Subsection 7.5.1, two of the
entries are not symmetric.
Mshould be 6, not 13, and
Mshould be -4, not 4. [Fixed in version 8.1.2.]
- Section 7.2: In the next-to-last code segment in Subsection 7.2.1,
double Bshould be
double B. [Corrected in Version 8.1.1.]
Errata for Version 8.0
This is a list of substantive errors that were found in the original Version 8.0 from December 2018. These errors have been corrected in Version 8.1.
- Section 3.9, Section 1: Three occurrences of g.drawLine should be g.strokeLine
- Chapter 6 Quiz Answers, in the answer to Question 5, "The drawLine command" should be "The strokeLine command".
- Section 10.6, next-to-last paragraph of the introductory material: "The net result is that we've added up the lengths of all the streams in the list" should be "The net result is that we've added up the lengths of all the strings in the list.
Some Old News
- November 25, 2017 -- My CPSC 124 web site includes programming assignments as well as tests and quizzes from the Fall 2017 of my Introductory Programming course [using the seventh edition of this textbook].
- March 19, 2016 -- I have added eBook versions of this textbook to the web site, in "epub" format and in "mobi" format for Kindle. They can be downloaded using links at the bottom of the front page. Note that there can be problems with the rendering of long lines in code samples, and that the problems will be worse on some devices. The eBook versions should be considered somewhat experimental. In addition to adding the eBooks, a very small number of errors (about a half dozen) have been fixed in the on-line and PDF versions, without changing the version number.
- August 1, 2014 -- Version 7 is released. Version 7 requires Java 7 or later. Note that with this version, the book no longer cover applets, and there are no applets in the on-line version. Readers are encouraged to download, compile, and run the examples. Links for downloading are available on the front page.
- May 17, 2013 -- Version 6.0.2 is released, with fixes for many small, mostly typographical errors. Again, thanks to readers who sent in error reports, especially Mark Christy and John Ganci, who found many errors.
- June 1, 2011 -- Version 6.0 is released. The sixth edition adds a new chapter on threads and multiprocessing and some coverage of new features of Java 6 and Java 7. Thanks to many readers who wrote with suggestions and error reports, especially to Jeff Wexler who sent a large numbers of corrections.