11.07.2015 Views

Introduction to Programming Using Java - Department of ...

Introduction to Programming Using Java - Department of ...

Introduction to Programming Using Java - Department of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Prefacexi<strong>of</strong> programming <strong>to</strong> cover more advanced <strong>to</strong>pics. Chapter 8 is mostly about writing robust andcorrect programs, but it also has a section on parallel processing and threads. Chapters 9 and10 cover recursion and data structures, including the <strong>Java</strong> Collection Framework. Chapter 11 isabout files and networking. Finally, Chapter 12 returns <strong>to</strong> the <strong>to</strong>pic <strong>of</strong> graphical user interfaceprogramming <strong>to</strong> cover some <strong>of</strong> <strong>Java</strong>’s more advanced capabilities.∗ ∗ ∗Major changes have been made in the fifth edition. Perhaps the most significant change isthe use <strong>of</strong> parameterized types in the chapter on generic programming. Parameterized types—<strong>Java</strong>’s version <strong>of</strong> templates—were the most eagerly anticipated new feature in <strong>Java</strong> 5.0.Other new features in <strong>Java</strong> 5.0 are also covered. Enumerated types are introduced, althoughthey are not covered in their full complexity. The “for-each” loop is covered and is usedextensively. Formatted output is also used extensively, and the Scanner class is covered (thoughnot until Chapter 11). Static import is covered briefly, as are variable arity methods.The non-standard TextIO class that I use for input in the first half <strong>of</strong> the book has beenrewritten <strong>to</strong> support formatted output. I have also added some file I/O capabilities <strong>to</strong> this class<strong>to</strong> make it possible <strong>to</strong> cover some examples that use files early in the book.<strong>Java</strong>doc comments are covered for the first time in this edition. Almost all code exampleshave been revised <strong>to</strong> use <strong>Java</strong>doc-style comments.The coverage <strong>of</strong> graphical user interface programming has been reorganized, much <strong>of</strong> it hasbeen rewritten, and new material has been added. In previous editions, I emphasized applets.Stand-alone GUI applications were covered at the end, almost as an afterthought. In the fifthedition, the emphasis on applets is gone, and almost all examples are presented as stand-aloneapplications. However, applet versions <strong>of</strong> each example are still presented on the web pages <strong>of</strong>the on-line version <strong>of</strong> the book. The chapter on advanced GUI programming has been moved<strong>to</strong> the end, and a significant amount <strong>of</strong> new material has been added, including coverage <strong>of</strong>some <strong>of</strong> the features <strong>of</strong> Graphics2D.Aside from the changes in content, the appearance <strong>of</strong> the book has been improved, especiallythe appearance <strong>of</strong> the PDF version. For the first time, the quality <strong>of</strong> the PDF approaches tha<strong>to</strong>f conventional textbooks.∗ ∗ ∗The latest complete edition <strong>of</strong> <strong>Introduction</strong> <strong>to</strong> <strong>Programming</strong> using <strong>Java</strong> is always availableon line at http://math.hws.edu/javanotes/. The first version <strong>of</strong> the book was written in 1996,and there have been several editions since then. All editions are archived at the following Webaddresses:• First edition: http://math.hws.edu/eck/cs124/javanotes1/ (Covers <strong>Java</strong> 1.0.)• Second edition: http://math.hws.edu/eck/cs124/javanotes2/ (Covers <strong>Java</strong> 1.1.)• Third edition: http://math.hws.edu/eck/cs124/javanotes3/ (Covers <strong>Java</strong> 1.1.)• Fourth edition: http://math.hws.edu/eck/cs124/javanotes4/ (Covers <strong>Java</strong> 1.4.)• Fifth edition: http://math.hws.edu/eck/cs124/javanotes5/ (Covers <strong>Java</strong> 5.0.)<strong>Introduction</strong> <strong>to</strong> <strong>Programming</strong> using <strong>Java</strong> is free, but it is not in the public domain. As <strong>of</strong>Version 5.0, it is published under the terms <strong>of</strong> the Creative Commons Attribution-Share Alike2.5 License. To view a copy <strong>of</strong> this license, visit http://creativecommons.org/licenses/by-sa/2.5/or send a letter <strong>to</strong> Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California,94105, USA. This license allows redistribution and modification under certain terms. Forexample, you can:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!