For introductory Computer Science courses using Java (CS1with Java), and other introductory programming courses in departments of Computer Science, Computer Engineering, Computer Information Systems, Management Information Systems, Information Technology, and Business.
Trusted authors Savitch and Carrano examine problem solving and programming techniques with Java. Students are introduced to object-oriented programming and important concepts such as design, testing and debugging, programming style, interfaces inheritance, and exception handling. The Java coverage is a concise, accessible introduction that covers key language features. Objects are covered thoroughly and early in the text, with an emphasis on application programs over applets. Revised throughout for enhanced clarity, the Fifth Edition has been entirely redesigned with a more accessible feel.
New To This Edition
. More emphasis on design before coding in programming
examples and case studies - Redesigns algorithms to stand
. More attention given to using methods prior to defining
. Coverage of enumerations and the for-each loop.
. Entirely new Exercises at the end of each chapter (answers given to
. Additional Self-Test Questions (with
. Two or three additional programming projects per chapter.
. Deletion of the appendix on SavitchIn (Java's Scanner
class makes it unnecessary).
. Additional coverage of interfaces.
. Coverage of Scanner replacing BufferedReader in the
chapter on streams and file I/O.
. Two new appendices: Getting and Installing Java; Running
. A new glossary of terms.
. Chapter 3 split to become chapters 3 and 4:
- The new chapter 3 covers the if statement, the switch
statement, and introduces enumerations.
- Chapter 4 covers loops.
. The chapter on inheritance is renamed Polymorphism and
Inheritance - Begins the chapter with additional coverage
. The chapter on recursion will move before the one on data
structures and generics.
. Chapter 14 (Applets and HTML) and chapter 15 (More Swing)
are moving out of the book and to a PH Website.
. Three brief appendices (1 to 3 of the 4e) will be moved
to the inside covers along with a new list of Java reserved
. Major reorganization within each chapter, as follows:
1. Chapter TOC
4. Body with level 1 and 2 heads for sections; the
following elements are integrated throughout.
- Self-Test Questions
- Case Studies
- Programming Examples
- Recap (formerly Quick Reference)
- Programming Tip
- Aside (new)
5. Chapter summary
7. Programming Projects
8. Answers to Self-Test Questions
. Margin notes worded as phrases that summarize important
ideas - Formerly, they contained only new terms.
. Displays of the previous edition now divided into figures
and program listings.
. Asides that present short commentary (relevant but
Features and Benefits
. Flexibility - Enables instructors to easily change the
order of chapters and sections covered.
. Early Graphics - Provides optional Graphics Supplement
sections at the end of chapters starting with Chapter 1. Those
instructors who prefer to postpone the coverage of graphics
May do so or skip the Graphics Supplement sections entirely.
. Coverage of problem-solving and programming techniques.
~Includes numerous case studies and programming tips.
~Provides many sections that explain important problem solving techniques, such as loop design
debugging techniques, Programming style, and basic object-oriented programming techniques, including UML, and
generic programming using type parameters.
. Object-Oriented and Traditional Techniques - Introduces
classes fairly early.
~Some exposure to using classes is given in Chapters 1 and
~Covers how to define classes in Chapter 5.
~The optional Graphics Supplement sections provide
additional early practice with classes.
~All of the basic information about classes, including
inheritance, is presented by the end of Chapter 8; however,
some topics regarding classes, including inheritance, can
be postponed to later in a course.
. Language Details and Sample Code - Gives complete
explanations of Java language features and lots of sample
- Programs are given in their entirety, along with sample
input and output.
- In many cases, there are even extra complete examples
available over the Internet, in addition to the complete
examples in the text.
. Self-Test questions - Spread throughout each chapter.
- These questions have a wide range of difficulty levels;
some require only a one-word answer, whereas others require
the reader to write an entire, but short program.
- Complete answers for all the self-test questions,
including those requiring full programs, are given at the
end of each chapter.
. Fully class-tested - Much of the material and many of the
methods of presentation were revised in response to this
. Student Resources - The source code from the book, code
for extra programming examples, and links to download
locations for Java compilers and programming environments
are provided on the book's website:
. Instructor's Resource Guide - A chapter-by-chapter guide
that contains numerous teaching hints, quiz questions with
solutions, and solutions to many exercises and programming projects.
. Companion Website-Includes code, PowerPoint slides, and
other teaching resources.
Table of Contents
Chapter 1 Introduction to Computers and Java
Chapter 2 Basic Computation
Chapter 3 Flow of Control: Branching
Chapter 4 Flow of Control: Loops
Chapter 5 Defining Classes and Methods
Chapter 6 More About Objects and Methods
Chapter 7 Arrays
Chapter 8 Polymorphism and Inheritance
Chapter 9 Exception Handling
Chapter 10 Streams and File I/O
Chapter 11 Recursion
Chapter 12 Dynamic Data Structures and Generics
Chapter 13 Window Interfaces Using Swing
Chapter 14 Applets and HTML
Chapter 15 More Swing
Appendix 1 Getting and Installing Java
Appendix 2 Running Applets
Appendix 3 Protected and Package Modifiers
Appendix 4 The DecimalFormat Class
Appendix 5 The Iterator Interface
Appendix 6 Cloning
Appendix 7 Javadoc
Appendix 8 The JOptionPane Class
Appendix 9 Differences between C++ and Java
About the Authors
Frank M. Carrano is a professor emeritus of computer science at the University of Rhode Island. He received the Ph.D. degree in computer science from Syracuse University in 1969. His interests include data structures, computer science education, social issues in computing, and numerical computation. Professor
Carrano is particularly interested in the design and delivery of undergraduate courses in computer science. He has authored several well-known computer science textbooks for undergraduates.
Walter Savitch received the Ph.D. degree in Mathematics from the University of California at Berkeley in 1969. Since that time he has been on the faculty at the University of California at San Diego and is currently a Professor of Computer Science and director of the Interdisciplinary Ph.D. Program in Cognitive Science. Professor Savitch's research areas include complexity theory, formal language theory, computational linguistics, and the development of computer science education materials. In addition to writing numerous research articles and involvement in other editorial projects, he has written a number of well-known computer science textbooks, including Pascal, Ada, and C++ CS1 and CS2 textbooks.