Introduction to Programming Using Java, Seventh Edition

Version 7.0, August 2014

(Version 7.0.1, with just a few corrections, August 2015)

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


WELCOME TO the Seventh 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 certainly not meant to provide complete coverage of the Java language.

The seventh edition requires Java 7, with just a couple brief mentions of Java 8. Previous versions included Java applets on the web pages that make up this book, but the applets have been eliminated from this version. Earlier editions of the book are still available; see the preface for links.

You can the download this web site for use on your own computer. PDF 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 README file for information about how to compile and run the examples.

Search this Text: Although this book does not have a conventional index, you can search it for terms that interest you. Note that this feature searches the book at its on-line site, so you must be working on-line to use it.

Search Introduction to Programming Using Java for pages...

Short Table of Contents:


©1996--2015, David J. Eck.
This work is licensed under a Creative Commons Attribution-Noncommercial-ShareAlike 3.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.)

The most recent version of this book is always available, at no charge, for downloading and for on-line use at the Web address: http://math.hws.edu/javanotes/

Downloading And Other Links

  • Full Web Site Download:
  • Source Code Downloads:
  • PDF Downloads:
    • http://math.hws.edu/eck/cs124/downloads/javanotes7-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.3 Megabytes; 755 pages.
    • http://math.hws.edu/eck/cs124/downloads/javanotes7.pdf — a PDF version without links, more suitable for printing. This PDF is in the format that is used for the printed version of the text, except that it also includes an appendix listing example programs and a glossary (since they would have exceeded the lulu.com page limit). Size: 5.9 Megabytes; 762 pages.
  • E-book Downloads.
    • http://math.hws.edu/eck/cs124/downloads/javanotes7.mobi, for Kindle.
    • http://math.hws.edu/eck/cs124/downloads/javanotes7.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 Copies Available from Lulu.com:
    • Printed versions — 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 rather thick printed version at http://www.lulu.com/content/612392. It is also available in two parts as http://www.lulu.com/content/559884 and http://www.lulu.com/content/822314. Note that these printed books are the original Version 7, and they still contain errors that have been fixed in Version 7.0.1. See the on-line news page for a list of substantive errors.
  • 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.

(1 August 2014, Version 7.0 released)
(1 August 2015, Version 7.0.1 released)
(19 March 2016, ebook downloads added)