Note: New Version Available...
A newer edition of Introduction to Programming Using Java
is available at http://math.hws.edu/javanotes/
(The new edition requires Java 1.3 or higher,
while this version uses Java 1.1.)
Introduction to Programming Using Java
Version 3.1, February 2001(Repackaged with minor corrections June 2004)
Author: David J. Eck (eck@hws.edu)
WELCOME TO Introduction to Programming Using Java, an on-line textbook on introductory programming, which uses Java as the language of instruction. This text has more than enough material for a one-semester course, and it is also suitable for individuals who want to learn programming on their own. This is the third edition of the text. (Version 3.1 is a minor upgrade of Version 3.0, which was released in May, 2000. Version 3.1 was released in February 2001 and incorporated a few changes and corrections. A final packaging of Version 3.1 was released in June 2004, incorporating corrections made since the release of Version 3.1. This version is released under the Open Publication License.) The third edition covers more material and has more examples than the second edition. It also adds end-of-chapter quizzes and solved programming exercises. Previous editions have been used in a course, Computer Science 124: Introductory Programming, at Hobart and William Smith Colleges. (The title of the previous editions included a reference to this course.) This textbook covers Java 1.1. Most of the applets that are contained in the text require Java 1.1 or higher.
Links for downloading copies of this text can be found at the bottom of this page. To learn more about this on-line text, please read its preface.
Short Table of Contents:
- Full Table of Contents
- Preface
- Preface to the Second Edition
- 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: Applets, HTML, and GUI's
- Chapter 7: Advanced GUI Programming
- Chapter 8: Arrays
- Chapter 9: Correctness and Robustness
- Chapter 10: Advanced Input/Output
- Chapter 11: Linked Data Structures and Recursion
- Appendix 1: From Java to C++
- Appendix 2: Some Notes on Java Programming Environments
- Appendix 3: Source code for all examples in the text
- News and Errata
This is a free textbook. As of Version 3.1, it is published under the terms of the Open Publication License, Version 1.0. The latest edition is always available, at no charge, for downloading and for on-line use at the Web address http://math.hws.edu/javanotes/. This edition, the third, is also permanently archived at the address http://math.hws.edu/eck/cs124/javanotes3/.
Downloading Links
Use one of the following direct links to download a compressed archive of this entire textbook. You can use this material on your own computer. You can also re-post it on any Web server: See the preface for more detailed information about downloading. In the preface, you will also find a link to a PDF file that can be used for printing the textbook.
- http://math.hws.edu/eck/cs124/downloads/javanotes3.zip (1.6 MB), for Windows. This can be used directly in Windows XP. On any version of Windows, you can open it using WinZip from www.winzip.com or Aladdin Expander for Windows from www.aladdinsys.com. (Note: The text files in this archive are in Windows/DOS format.)
- http://math.hws.edu/eck/cs124/downloads/javanotes3.tar.bz2 (1.0 MB), for Linux/MaxOS. In Linux, you should be able to expand this using the command "bunzip2 javanotes3.tar.bz2" followed by "tar xf javanotes3.tar.bz2"; this will also work in UNIX, if you have the bunzip2 program. For MacOS, your browser will probably expand it automatically when you download it,or it can be opened with Stuffit Expander from www.aladdinsys.com.
The following archives in older formats do not include the final corrections of June 2004:
- http://math.hws.edu/eck/cs124/downloads/javanotes3.sit.hqx (2.1 MB), for Macintosh.
- http://math.hws.edu/eck/cs124/downloads/javanotes3.tar.Z (1.8 MB), for Linux/UNIX.
David Eck (eck@hws.edu)
Version 3.0, May 2000
Version 3.1, with minor changes, February 2001
Final packaging, with further corrections, June 2004