100% found this document useful (3 votes)
59 views

Introduction to Java Programming, Comprehensive Version Y. Daniel Liang All Chapters Instant Download

The document promotes various Java programming ebooks available for download on ebookmass.com, including titles by Y. Daniel Liang and others. It highlights features of the comprehensive edition of 'Introduction to Java Programming' which includes updated content, new chapters, and a focus on problem-solving. The book is designed to teach programming fundamentals, object-oriented concepts, and advanced topics in a structured manner suitable for university courses.

Uploaded by

melikjamil1x
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
59 views

Introduction to Java Programming, Comprehensive Version Y. Daniel Liang All Chapters Instant Download

The document promotes various Java programming ebooks available for download on ebookmass.com, including titles by Y. Daniel Liang and others. It highlights features of the comprehensive edition of 'Introduction to Java Programming' which includes updated content, new chapters, and a focus on problem-solving. The book is designed to teach programming fundamentals, object-oriented concepts, and advanced topics in a structured manner suitable for university courses.

Uploaded by

melikjamil1x
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Download the Full Ebook and Access More Features - ebookmass.

com

Introduction to Java Programming, Comprehensive


Version Y. Daniel Liang

https://ebookmass.com/product/introduction-to-java-
programming-comprehensive-version-y-daniel-liang/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookmass.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Java Programming: A Comprehensive Introduction, First


edition

https://ebookmass.com/product/java-programming-a-comprehensive-
introduction-first-edition/

ebookmass.com

Introduction to Programming with Java: A Problem Solving


Approach 3rd Edition John Dean

https://ebookmass.com/product/introduction-to-programming-with-java-a-
problem-solving-approach-3rd-edition-john-dean/

ebookmass.com

Introduction to Java Through Game Development: Learn Java


Programming Skills by Working with Video Games 1st Edition
Victor G. Brusca
https://ebookmass.com/product/introduction-to-java-through-game-
development-learn-java-programming-skills-by-working-with-video-
games-1st-edition-victor-g-brusca/
ebookmass.com

Protecting China's Interests Overseas: Securitization and


Foreign Policy Andrea Ghiselli

https://ebookmass.com/product/protecting-chinas-interests-overseas-
securitization-and-foreign-policy-andrea-ghiselli/

ebookmass.com
Canadian Families Today Fourth Edition Patrizia Albanese

https://ebookmass.com/product/canadian-families-today-fourth-edition-
patrizia-albanese/

ebookmass.com

Le diagnostic en médecine chinoise 2nd Edition Giovanni


Maciocia [Maciocia

https://ebookmass.com/product/le-diagnostic-en-medecine-chinoise-2nd-
edition-giovanni-maciocia-maciocia/

ebookmass.com

Comprehensive Care of the Transgender Patient 1st Edition


Cecile A. Ferrando

https://ebookmass.com/product/comprehensive-care-of-the-transgender-
patient-1st-edition-cecile-a-ferrando/

ebookmass.com

Wolf to the Rescue Terry Spear

https://ebookmass.com/product/wolf-to-the-rescue-terry-spear-4/

ebookmass.com

A tribute to Emil Wolf First Edition. Edition Visser

https://ebookmass.com/product/a-tribute-to-emil-wolf-first-edition-
edition-visser/

ebookmass.com
Master Catteneo: Dark Vampire Romance (Masters of the
Consulate Book 5) Sylvia Black

https://ebookmass.com/product/master-catteneo-dark-vampire-romance-
masters-of-the-consulate-book-5-sylvia-black/

ebookmass.com
INTRODUCTION TO

JAVA
®

PROGRAMMING
COMPREHENSIVE VERSION

Tenth Edition

Y. Daniel Liang
Armstrong Atlantic State University

Boston Columbus Indianapolis New York San Francisco Upper Saddle River
Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto
Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
To Samantha, Michael, and Michelle

Editorial Director, ECS: Marcia Horton Cover Designer: Marta Samsel


Executive Editor: Tracy Johnson (Dunkelberger) Permissions Supervisor: Michael Joyce
Editorial Assistant: Jenah Blitz-Stoehr Permissions Administrator: Jenell Forschler
Director of Marketing: Christy Lesko Director, Image Asset Services: Annie Atherton
Marketing Manager: Yez Alayan Manager, Visual Research: Karen Sanatar
Marketing Assistant: Jon Bryant Image Permission Coordinator:
Director of Program Management: Erin Gregg Cover Art: © Blend Images—PBNJ Productions/Getty
Program Management-Team Lead: Scott Disanno Images
Program Manager: Carole Snyder Media Project Manager: Renata Butera
Project Management-Team Lead: Laura Burgess Full-Service Project Management: Haseen Khan,
Project Manager: Robert Engelhardt Laserwords Pvt Ltd
Procurement Specialist: Linda Sager

Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook
appear on the appropriate page within text.

Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other
countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not
sponsored or endorsed by or affiliated with the Microsoft Corporation.

Copyright © 2015, 2013, 2011 Pearson Education, Inc., publishing as Prentice Hall, 1 Lake Street, Upper Saddle
River, New Jersey, 07458. All rights reserved. Printed in the United States of America. This publication is protected
by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in
a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording,
or likewise. To obtain permission(s) to use material from this work, please submit a written request to Pearson
Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458, or you may fax
your request to 201-236-3290.

Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks.
Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations
have been printed in initial caps or all caps.

Library of Congress Cataloging-in-Publication Data available upon request.

10 9 8 7 6 5 4 3 2 1

ISBN 10: 0-13-376131-2


ISBN 13: 978-0-13-376131-3
PREFACE
Dear Reader,

Many of you have provided feedback on earlier editions of this book, and your comments and
suggestions have greatly improved the book. This edition has been substantially enhanced in
presentation, organization, examples, exercises, and supplements. The new edition:
■ Replaces Swing with JavaFX. JavaFX is a new framework for developing Java GUI pro- what is new?
grams. JavaFX greatly simplifies GUI programming and is easier to learn than Swing.
■ Introduces exception handling, abstract classes, and interfaces before GUI programming to
enable the GUI chapters to be skipped completely if the instructor chooses not to cover GUI.
■ Covers introductions to objects and strings earlier in Chapter 4 to enable students to use
objects and strings to develop interesting programs early.
■ Includes many new interesting examples and exercises to stimulate student interests. More
than 100 additional programming exercises are provided to instructors only on the Com-
panion Website.
Please visit www.pearsonhighered.com/liang for a complete list of new features as well as
correlations to the previous edition.
The book is fundamentals first by introducing basic programming concepts and techniques fundamentals-first
before designing custom classes. The fundamental concepts and techniques of selection
statements, loops, methods, and arrays are the foundation for programming. Building this
strong foundation prepares students to learn object-oriented programming and advanced Java
programming.
This book teaches programming in a problem-driven way that focuses on problem solv- problem-driven
ing rather than syntax. We make introductory programming interesting by using thought-
provoking problems in a broad context. The central thread of early chapters is on problem
solving. Appropriate syntax and library are introduced to enable readers to write programs for
solving the problems. To support the teaching of programming in a problem-driven way, the
book provides a wide variety of problems at various levels of difficulty to motivate students.
To appeal to students in all majors, the problems cover many application areas, including
math, science, business, financial, gaming, animation, and multimedia.
The book seamlessly integrates programming, data structures, and algorithms into one text. data structures
It employs a practical approach to teach data structures. We first introduce how to use various
data structures to develop efficient algorithms, and then show how to implement these data
structures. Through implementation, students gain a deep understanding on the efficiency of
data structures and on how and when to use certain data structures. Finally we design and
implement custom data structures for trees and graphs.
The book is widely used in the introductory programming, data structures, and algorithms
courses in the universities around the world. This comprehensive version covers fundamentals comprehensive version
of programming, object-oriented programming, GUI programming, data structures, algorithms,
concurrency, networking, database, and Web programming. It is designed to prepare students
to become proficient Java programmers. A brief version (Introduction to Java Programming, brief version
Brief Version, Tenth Edition) is available for a first course on programming, commonly known AP Computer Science
as CS1. The brief version contains the first 18 chapters of the comprehensive version. The first
13 chapters are appropriate for preparing the AP Computer Science exam.
The best way to teach programming is by example, and the only way to learn program- examples and exercises
ming is by doing. Basic concepts are explained by example and a large number of exercises

iii
iv Preface
with various levels of difficulty are provided for students to practice. For our programming
courses, we assign programming exercises after each lecture.
Our goal is to produce a text that teaches problem solving and programming in a broad
context using a wide variety of interesting examples. If you have any comments on and sug-
gestions for improving the book, please email me.
Sincerely,

Y. Daniel Liang
y.daniel.liang@gmail.com
www.cs.armstrong.edu/liang
www.pearsonhighered.com/liang

ACM/IEEE Curricular 2013 and ABET


Course Assessment
The new ACM/IEEE Computer Science Curricular 2013 defines the Body of Knowledge
organized into 18 Knowledge Areas. To help instructors design the courses based on this book,
we provide sample syllabi to identify the Knowledge Areas and Knowledge Units. The sample
syllabi are for a three semester course sequence and serve as an example for institutional cus-
tomization. The sample syllabi are available to instructors at www.pearsonhighered.com/liang.
Many of our users are from the ABET-accredited programs. A key component of the ABET
accreditation is to identify the weakness through continuous course assessment against the course
outcomes. We provide sample course outcomes for the courses and sample exams for measuring
course outcomes on the instructor Website accessible from www.pearsonhighered.com/liang.

What’s New in This Edition?


This edition is completely revised in every detail to enhance clarity, presentation, content,
examples, and exercises. The major improvements are as follows:
■ Updated to Java 8.
■ Since Swing is replaced by JavaFX, all GUI examples and exercises are revised using
JavaFX.
■ Lambda expressions are used to simplify coding in JavaFX and threads.
■ More than 100 additional programming exercises with solutions are provided to the
instructor on the Companion Website. These exercises are not printed in the text.
■ Math methods are introduced earlier in Chapter 4 to enable students to write code using
math functions.
■ Strings are introduced earlier in Chapter 4 to enable students to use objects and strings to
develop interesting programs early.
■ The GUI chapters are moved to after abstract classes and interfaces so that these chapters
can be easily skipped if the instructor chooses not to cover GUI.
■ Chapters 4, 14, 15, and 16 are brand new chapters.
■ Chapters 28 and 29 have been substantially revised with simpler implementations for min-
imum spanning trees and shortest paths.
Preface v

Pedagogical Features
The book uses the following elements to help students get the most from the material:
■ The Objectives at the beginning of each chapter list what students should learn from the
chapter. This will help them determine whether they have met the objectives after completing
the chapter.
■ The Introduction opens the discussion with representative problems to give the reader an
overview of what to expect from the chapter.
■ Key Points highlight the important concepts covered in each section.
■ Check Points provide review questions to help students track their progress as they read
through the chapter and evaluate their learning.
■ Problems and Case Studies, carefully chosen and presented in an easy-to-follow style,
teach problem solving and programming concepts. The book uses many small, simple, and
stimulating examples to demonstrate important ideas.
■ The Chapter Summary reviews the important subjects that students should under-
stand and remember. It helps them reinforce the key concepts they have learned in the
chapter.
■ Quizzes are accessible online, grouped by sections, for students to do self-test on pro-
gramming concepts and techniques.
■ Programming Exercises are grouped by sections to provide students with opportunities
to apply the new skills they have learned on their own. The level of difficulty is rated as
easy (no asterisk), moderate (*), hard (**), or challenging (***). The trick of learning
programming is practice, practice, and practice. To that end, the book provides a great
many exercises. Additionally, more than 100 programming exercises with solutions are
provided to the instructors on the Companion Website. These exercises are not printed in
the text.
■ Notes, Tips, Cautions, and Design Guides are inserted throughout the text to offer valu-
able advice and insight on important aspects of program development.

Note
Provides additional information on the subject and reinforces important concepts.

Tip
Teaches good programming style and practice.

Caution
Helps students steer away from the pitfalls of programming errors.

Design Guide
Provides guidelines for designing programs.

Flexible Chapter Orderings


The book is designed to provide flexible chapter orderings to enable GUI, exception handling,
recursion, generics, and the Java Collections Framework to be covered earlier or later. The
diagram on the next page shows the chapter dependencies.
vi Preface
Part I: Fundamentals of Part II: Object-Oriented Part III: GUI Programming Part IV: Data Structures and Part V: Advanced Java
Programming Programming Algorithms Ch 16 Programming
Chapter 1 Introduction to Chapter 9 Objects and Classes Chapter 14 JavaFX Basics Ch 7 Chapter 18 Recursion Chapter 30 Multithreading and
Computers, Programs, and Parallel Programming
Java
Chapter 10 Thinking in Objects Chapter 15 Event-Driven Ch 13 Chapter 19 Generics
Programming and Chapter 31 Networking
Chapter 2 Elementary Animations
Chapter 11 Inheritance and Chapter 20 Lists, Stacks, Queues,
Programming
Polymorphism and Priority Queues Chapter 32 Java Database
Chapter 16 JavaFX Controls Programming
Chapter 3 Selections and Multimedia
Chapter 12 Exception Chapter 21 Sets and Maps
Handling and Text I/O Chapter 33 JavaServer Faces
Chapter 4 Mathematical Chapter 34 Advanced GUI Chapter 22 Developping
Functions, Characters, Chapter 13 Abstract Classes Programming Efficient Algorithms
and Strings and Interfaces Chapter 35 Advanced Database
Programming
Chapter 23 Sorting
Chapter 5 Loops Chapter 17 Binary I/O

Chapter 24 Implementing Lists, Chapter 36 Internationalization


Chapter 6 Methods Stacks, Queues, and Priority
Queues

Chapter 7 Single-Dimensional Chapter 37 Servlets


Arrays Chapter 25 Binary Search Trees

Note: Chapters 1–18 are in the Chapter 38 JavaServer Pages


Chapter 8 Multidimensional Chapter 26 AVL Trees
brief version of this book.
Arrays
Note: Chapters 1–33 are in the Chapter 27 Hashing Chapter 39 Web Services
comprehensive version.

Note: Chapters 34–42 are bonus Chapter 28 Graphs and


chapters available from the Applications
Companion Website.
Chapter 29 Weighted Graphs
and Applications

Chapter 40 2-4 Trees and B-


Trees

Chapter 41 Red-Black Trees Ch 9 Chapter 42 Testing Using JUnit


Preface vii

Organization of the Book


The chapters can be grouped into five parts that, taken together, form a comprehensive introduc-
tion to Java programming, data structures and algorithms, and database and Web programming.
Because knowledge is cumulative, the early chapters provide the conceptual basis for under-
standing programming and guide students through simple examples and exercises; subsequent
chapters progressively present Java programming in detail, culminating with the development
of comprehensive Java applications. The appendixes contain a mixed bag of topics, including an
introduction to number systems, bitwise operations, regular expressions, and enumerated types.

Part I: Fundamentals of Programming (Chapters 1–8)


The first part of the book is a stepping stone, preparing you to embark on the journey of learning
Java. You will begin to learn about Java (Chapter 1) and fundamental programming techniques
with primitive data types, variables, constants, assignments, expressions, and operators (Chapter 2),
selection statements (Chapter 3), mathematical functions, characters, and strings (Chapter 4), loops
(Chapter 5), methods (Chapter 6), and arrays (Chapters 7–8). After Chapter 7, you can jump to
Chapter 18 to learn how to write recursive methods for solving inherently recursive problems.

Part II: Object-Oriented Programming (Chapters 9–13, and 17)


This part introduces object-oriented programming. Java is an object-oriented programming
language that uses abstraction, encapsulation, inheritance, and polymorphism to provide
great flexibility, modularity, and reusability in developing software. You will learn program-
ming with objects and classes (Chapters 9–10), class inheritance (Chapter 11), polymorphism
(Chapter 11), exception handling (Chapter 12), abstract classes (Chapter 13), and interfaces
(Chapter 13). Text I/O is introduced in Chapter 12 and binary I/O is discussed in Chapter 17.

Part III: GUI Programming (Chapters 14–16 and Bonus Chapter 34)
JavaFX is a new framework for developing Java GUI programs. It is not only useful for
developing GUI programs, but also an excellent pedagogical tool for learning object-oriented
programming. This part introduces Java GUI programming using JavaFX in Chapters 14–16.
Major topics include GUI basics (Chapter 14), container panes (Chapter 14), drawing shapes
(Chapter 14), event-driven programming (Chapter 15), animations (Chapter 15), and GUI
controls (Chapter 16), and playing audio and video (Chapter 16). You will learn the architec-
ture of JavaFX GUI programming and use the controls, shapes, panes, image, and video to
develop useful applications. Chapter 34 covers advanced features in JavaFX.

Part IV: Data Structures and Algorithms (Chapters 18–29 and Bonus Chapters 40–41)
This part covers the main subjects in a typical data structures and algorithms course. Chapter 18
introduces recursion to write methods for solving inherently recursive problems. Chapter 19
presents how generics can improve software reliability. Chapters 20 and 21 introduce the
Java Collection Framework, which defines a set of useful API for data structures. Chapter 22
discusses measuring algorithm efficiency in order to choose an appropriate algorithm for
applications. Chapter 23 describes classic sorting algorithms. You will learn how to implement
several classic data structures lists, queues, and priority queues in Chapter 24. Chapters 25 and
26 introduce binary search trees and AVL trees. Chapter 27 presents hashing and implement-
ing maps and sets using hashing. Chapters 28 and 29 introduce graph applications. The 2-4
trees, B-trees, and red-black trees are covered in Bonus Chapters 40–41.

Part V: Advanced Java Programming (Chapters 30–33 and Bonus Chapters 35–39, 42)
This part of the book is devoted to advanced Java programming. Chapter 30 treats the use
of multithreading to make programs more responsive and interactive and introduces parallel
programming. Chapter 31 discusses how to write programs that talk with each other from
different hosts over the Internet. Chapter 32 introduces the use of Java to develop database
viii Preface
projects. Chapter 33 introduces modern Web application development using JavaServer Faces.
Chapter 35 delves into advanced Java database programming. Chapter 36 covers the use of
internationalization support to develop projects for international audiences. Chapters 37 and
38 introduce how to use Java servlets and JavaServer Pages to generate dynamic content from
Web servers. Chapter 39 discusses Web services. Chapter 42 introduces testing Java programs
using JUnit.

Appendixes
This part of the book covers a mixed bag of topics. Appendix A lists Java keywords.
Appendix B gives tables of ASCII characters and their associated codes in decimal and in
hex. Appendix C shows the operator precedence. Appendix D summarizes Java modifiers and
their usage. Appendix E discusses special floating-point values. Appendix F introduces num-
ber systems and conversions among binary, decimal, and hex numbers. Finally, Appendix G
introduces bitwise operations. Appendix H introduces regular expressions. Appendix I covers
enumerated types.

Java Development Tools


You can use a text editor, such as the Windows Notepad or WordPad, to create Java programs
and to compile and run the programs from the command window. You can also use a Java
development tool, such as NetBeans or Eclipse. These tools support an integrated develop-
ment environment (IDE) for developing Java programs quickly. Editing, compiling, building,
executing, and debugging programs are integrated in one graphical user interface. Using these
tools effectively can greatly increase your programming productivity. NetBeans and Eclipse
IDE tutorials are easy to use if you follow the tutorials. Tutorials on NetBeans and Eclipse can be found
under Tutorials on the Student Companion Website at www.pearsonhighered.com/liang.

Student Resource Website


The Student Resource Website www.pearsonhighered.com/liang provides access to some of the
following resources. Other resources are available using the student access code printed on the
inside front cover of this book. (For students with a used copy of this book, you can purchase
access to the premium student resources through www.pearsonhighered.com/liang.)
■ Answers to review questions
■ Solutions to even-numbered programming exercises
■ Source code for the examples in the book
■ Interactive quiz (organized by sections for each chapter)
■ Supplements
■ Debugging tips
■ Algorithm animations
■ Errata

Instructor Resource Website


The Instructor Resource Website, accessible from www.pearsonhighered.com/liang, provides
access to the following resources:
■ Microsoft PowerPoint slides with interactive buttons to view full-color, syntax-highlighted
source code and to run programs without leaving the slides.
■ Solutions to all programming exercises. Students will have access to the solutions of even-
numbered programming exercises.
Preface ix
■ More than 100 additional programming exercises organized by chapters. These exercises
are available only to the instructors. Solutions to these exercises are provided.
■ Web-based quiz generator. (Instructors can choose chapters to generate quizzes from a
large database of more than two thousand questions.)
■ Sample exams. Most exams have four parts:
■ Multiple-choice questions or short-answer questions
■ Correct programming errors
■ Trace programs
■ Write programs
■ ACM/IEEE Curricula 2013. The new ACM/IEEE Computer Science Curricula 2013
defines the Body of Knowledge organized into 18 Knowledge Areas. To help instructors
design the courses based on this book, we provide sample syllabi to identify the Knowl-
edge Areas and Knowledge Units. The sample syllabi are for a three semester course
sequence and serve as an example for institutional customization. Instructors can access
the syllabi at www.pearsonhighered.com/liang.
■ Sample exams with ABET course assessment.
■ Projects. In general, each project gives a description and asks students to analyze, design,
and implement the project.
Some readers have requested the materials from the Instructor Resource Website. Please
understand that these are for instructors only. Such requests will not be answered.

Online Practice and Assessment


with MyProgrammingLab
MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of pro-
gramming. Through practice exercises and immediate, personalized feedback, MyProgram-
mingLab improves the programming competence of beginning students who often struggle
with the basic concepts and paradigms of popular high-level programming languages.
A self-study and homework tool, a MyProgrammingLab course consists of hundreds of
small practice problems organized around the structure of this textbook. For students, the sys-
tem automatically detects errors in the logic and syntax of their code submissions and offers
targeted hints that enable students to figure out what went wrong—and why. For instructors,
a comprehensive gradebook tracks correct and incorrect answers and stores the code inputted
by students for review.
MyProgrammingLab is offered to users of this book in partnership with Turing’s Craft, the
makers of the CodeLab interactive programming exercise system. For a full demonstration,
to see feedback from instructors and students, or to get started using MyProgrammingLab in
your course, visit www.myprogramminglab.com.

VideoNotes
We are excited about the new VideoNotes feature that is found in this new edition. These VideoNote

videos provide additional help by presenting examples of key topics and showing how to
solve problems completely, from design through coding. VideoNotes are available from
www.pearsonhighered.com/liang.
x Preface

Algorithm Animations
Animation We have provided numerous animations for algorithms. These are valuable pedagogical tools
to demonstrate how algorithms work. Algorithm animations can be accessed from the Com-
panion Website.

Acknowledgments
I would like to thank Armstrong Atlantic State University for enabling me to teach what I
write and for supporting me in writing what I teach. Teaching is the source of inspiration for
continuing to improve the book. I am grateful to the instructors and students who have offered
comments, suggestions, bug reports, and praise.
This book has been greatly enhanced thanks to outstanding reviews for this and previous
editions. The reviewers are: Elizabeth Adams (James Madison University), Syed Ahmed (North
Georgia College and State University), Omar Aldawud (Illinois Institute of Technology), Stefan
Andrei (Lamar University), Yang Ang (University of Wollongong, Australia), Kevin Bierre
(Rochester Institute of Technology), David Champion (DeVry Institute), James Chegwidden
(Tarrant County College), Anup Dargar (University of North Dakota), Charles Dierbach (Towson
University), Frank Ducrest (University of Louisiana at Lafayette), Erica Eddy (University of
Wisconsin at Parkside), Deena Engel (NewYork University), Henry A. Etlinger (Rochester Institute
of Technology), James Ten Eyck (Marist College), Myers Foreman (Lamar University), Olac
Fuentes (University of Texas at El Paso), Edward F. Gehringer (North Carolina State University),
Harold Grossman (Clemson University), Barbara Guillot (Louisiana State University), Stuart
Hansen (University of Wisconsin, Parkside), Dan Harvey (Southern Oregon University), Ron
Hofman (Red River College, Canada), Stephen Hughes (Roanoke College), Vladan Jovanovic
(Georgia Southern University), Edwin Kay (Lehigh University), Larry King (University of
Texas at Dallas), Nana Kofi (Langara College, Canada), George Koutsogiannakis (Illinois
Institute of Technology), Roger Kraft (Purdue University at Calumet), Norman Krumpe (Miami
University), Hong Lin (DeVry Institute), Dan Lipsa (Armstrong Atlantic State University),
James Madison (Rensselaer Polytechnic Institute), Frank Malinowski (Darton College),
Tim Margush (University of Akron), Debbie Masada (Sun Microsystems), Blayne Mayfield
(Oklahoma State University), John McGrath (J.P. McGrath Consulting), Hugh McGuire (Grand
Valley State), Shyamal Mitra (University of Texas at Austin), Michel Mitri (James Madison
University), Kenrick Mock (University of Alaska Anchorage), Frank Murgolo (California
State University, Long Beach), Jun Ni (University of Iowa), Benjamin Nystuen (University of
Colorado at Colorado Springs), Maureen Opkins (CA State University, Long Beach), Gavin
Osborne (University of Saskatchewan), Kevin Parker (Idaho State University), Dale Parson
(Kutztown University), Mark Pendergast (Florida Gulf Coast University), Richard Povinelli
(Marquette University), Roger Priebe (University of Texas at Austin), Mary Ann Pumphrey (De
Anza Junior College), Pat Roth (Southern Polytechnic State University), Amr Sabry (Indiana
University), Ben Setzer (Kennesaw State University), Carolyn Schauble (Colorado State
University), David Scuse (University of Manitoba), Ashraf Shirani (San Jose State University),
Daniel Spiegel (Kutztown University), Joslyn A. Smith (Florida Atlantic University), Lixin
Tao (Pace University), Ronald F. Taylor (Wright State University), Russ Tront (Simon Fraser
University), Deborah Trytten (University of Oklahoma), Michael Verdicchio (Citadel), Kent
Vidrine (George Washington University), and Bahram Zartoshty (California State University
at Northridge).
It is a great pleasure, honor, and privilege to work with Pearson. I would like to thank Tracy
Johnson and her colleagues Marcia Horton, Yez Alayan, Carole Snyder, Scott Disanno, Bob
Engelhardt, Haseen Khan, and their colleagues for organizing, producing, and promoting this
project.
As always, I am indebted to my wife, Samantha, for her love, support, and encouragement.
BRIEF CONTENTS
1 Introduction to Computers, Programs, 29 Weighted Graphs and Applications 1061
and Java 1 30 Multithreading and Parallel Programming 1097
2 Elementary Programming 33 31 Networking 1139
3 Selections 75 32 Java Database Programming 1173
4 Mathematical Functions, Characters, 33 JavaServer Faces 1213
and Strings 119
5 Loops 157
6 Methods 203
7 Single-Dimensional Arrays 245 Chapters 34–42 are bonus Web chapters
8 Multidimensional Arrays 287 34 Advanced JavaFX 34-1
9 Objects and Classes 321 35 Advanced Database Programming 35-1
10 Object-Oriented Thinking 365 36 Internationalization 36-1
11 Inheritance and Polymorphism 409 37 Servlets 37-1
12 Exception Handling and Text I/O 449 38 JavaServer Pages 38-1
13 Abstract Classes and Interfaces 495 39 Web Services 39-1
14 JavaFX Basics 535 40 2-4 Trees and B-Trees 40-1
15 Event-Driven Programming 41 Red-Black Trees 41-1
and Animations 585 42 Testing Using JUnit 42-1
16 JavaFX UI Controls and Multimedia 629
17 Binary I/O 677
18 Recursion 705 Appendixes
19 Generics 737 A Java Keywords 1263
20 Lists, Stacks, Queues, B The ASCII Character Set 1266
and Priority Queues 761
C Operator Precedence Chart 1268
21 Sets and Maps 797
D Java Modifiers 1270
22 Developing Efficient Algorithms 821
E Special Floating-Point Values 1272
23 Sorting 861
F Number Systems 1273
24 Implementing Lists, Stacks, Queues,
and Priority Queues 895 G Bitwise Operatoirns 1277
25 Binary Search Trees 929 H Regular Expressions 1278
26 AVL Trees 965 I Enumerated Types 1283
27 Hashing 985
28 Graphs and Applications 1015 Index 1289

xi
CONTENTS
Chapter 1 Introduction to Computers, Programs,
and Java 1
1.1 Introduction 2
1.2 What Is a Computer? 2
1.3 Programming Languages 7
1.4 Operating Systems 9
1.5 Java, the World Wide Web, and Beyond 10
1.6 The Java Language Specification, API, JDK, and IDE 11
1.7 A Simple Java Program 12
1.8 Creating, Compiling, and Executing a Java Program 15
1.9 Programming Style and Documentation 18
1.10 Programming Errors 20
1.11 Developing Java Programs Using NetBeans 23
1.12 Developing Java Programs Using Eclipse 25

Chapter 2 Elementary Programming 33


2.1 Introduction 34
2.2 Writing a Simple Program 34
2.3 Reading Input from the Console 37
2.4 Identifiers 39
2.5 Variables 40
2.6 Assignment Statements and Assignment Expressions 41
2.7 Named Constants 43
2.8 Naming Conventions 44
2.9 Numeric Data Types and Operations 44
2.10 Numeric Literals 48
2.11 Evaluating Expressions and Operator Precedence 50
2.12 Case Study: Displaying the Current Time 52
2.13 Augmented Assignment Operators 54
2.14 Increment and Decrement Operators 55
2.15 Numeric Type Conversions 56
2.16 Software Development Process 59
2.17 Case Study: Counting Monetary Units 63
2.18 Common Errors and Pitfalls 65

Chapter 3 Selections 75
3.1 Introduction 76
3.2 boolean Data Type 76
3.3 if Statements 78
3.4 Two-Way if-else Statements 80
3.5 Nested if and Multi-Way if-else Statements 81
3.6 Common Errors and Pitfalls 83
3.7 Generating Random Numbers 87
3.8 Case Study: Computing Body Mass Index 89
3.9 Case Study: Computing Taxes 90
3.10 Logical Operators 93
3.11 Case Study: Determining Leap Year 97
3.12 Case Study: Lottery 98
3.13 switch Statements 100
3.14 Conditional Expressions 103
xii
xiii
3.15 Operator Precedence and Associativity 104
3.16 Debugging 106

Chapter 4 Mathematical Functions, Characters,


and Strings 119
4.1 Introduction 120
4.2 Common Mathematical Functions 120
4.3 Character Data Type and Operations 125
4.4 The String Type 130
4.5 Case Studies 139
4.6 Formatting Console Output 145

Chapter 5 Loops 157


5.1 Introduction 158
5.2 The while Loop 158
5.3 The do-while Loop 168
5.4 The for Loop 170
5.5 Which Loop to Use? 174
5.6 Nested Loops 176
5.7 Minimizing Numeric Errors 178
5.8 Case Studies 179
5.9 Keywords break and continue 184
5.10 Case Study: Checking Palindromes 187
5.11 Case Study: Displaying Prime Numbers 188

Chapter 6 Methods 203


6.1 Introduction 204
6.2 Defining a Method 204
6.3 Calling a Method 206
6.4 void Method Example 209
6.5 Passing Arguments by Values 212
6.6 Modularizing Code 215
6.7 Case Study: Converting Hexadecimals to Decimals 217
6.8 Overloading Methods 219
6.9 The Scope of Variables 222
6.10 Case Study: Generating Random Characters 223
6.11 Method Abstraction and Stepwise Refinement 225

Chapter 7 Single-Dimensional Arrays 245


7.1 Introduction 246
7.2 Array Basics 246
7.3 Case Study: Analyzing Numbers 253
7.4 Case Study: Deck of Cards 254
7.5 Copying Arrays 256
7.6 Passing Arrays to Methods 257
7.7 Returning an Array from a Method 260
7.8 Case Study: Counting the Occurrences of Each Letter 261
7.9 Variable-Length Argument Lists 264
7.10 Searching Arrays 265
7.11 Sorting Arrays 269
7.12 The Arrays Class 270
7.13 Command-Line Arguments 272

Chapter 8 Multidimensional Arrays 287


8.1 Introduction 288
8.2 Two-Dimensional Array Basics 288
xiv Contents
8.3 Processing Two-Dimensional Arrays 291
8.4 Passing Two-Dimensional Arrays to Methods 293
8.5 Case Study: Grading a Multiple-Choice Test 294
8.6 Case Study: Finding the Closest Pair 296
8.7 Case Study: Sudoku 298
8.8 Multidimensional Arrays 301

Chapter 9 Objects and Classes 321


9.1 Introduction 322
9.2 Defining Classes for Objects 322
9.3 Example: Defining Classes and Creating Objects 324
9.4 Constructing Objects Using Constructors 329
9.5 Accessing Objects via Reference Variables 330
9.6 Using Classes from the Java Library 334
9.7 Static Variables, Constants, and Methods 337
9.8 Visibility Modifiers 342
9.9 Data Field Encapsulation 344
9.10 Passing Objects to Methods 347
9.11 Array of Objects 351
9.12 Immutable Objects and Classes 353
9.13 The Scope of Variables 355
9.14 The this Reference 356

Chapter 10 Object-Oriented Thinking 365


10.1 Introduction 366
10.2 Class Abstraction and Encapsulation 366
10.3 Thinking in Objects 370
10.4 Class Relationships 373
10.5 Case Study: Designing the Course Class 376
10.6 Case Study: Designing a Class for Stacks 378
10.7 Processing Primitive Data Type Values as Objects 380
10.8 Automatic Conversion between Primitive Types
and Wrapper Class Types 383
10.9 The BigInteger and BigDecimal Classes 384
10.10 The String Class 386
10.11 The StringBuilder and StringBuffer Classes 392

Chapter 11 Inheritance and Polymorphism 409


11.1 Introduction 410
11.2 Superclasses and Subclasses 410
11.3 Using the super Keyword 416
11.4 Overriding Methods 419
11.5 Overriding vs. Overloading 420
11.6 The Object Class and Its toString() Method 422
11.7 Polymorphism 423
11.8 Dynamic Binding 424
11.9 Casting Objects and the instanceof Operator 427
11.10 The Object’s equals Method 431
11.11 The ArrayList Class 432
11.12 Useful Methods for Lists 438
11.13 Case Study: A Custom Stack Class 439
11.14 The protected Data and Methods 440
11.15 Preventing Extending and Overriding 442

Chapter 12 Exception Handling and Text I/O 449


12.1 Introduction 450
12.2 Exception-Handling Overview 450
Exploring the Variety of Random
Documents with Different Content
“Good descriptions of the country. Women will like it.”

+ Booklist 16:203 Mr ’20

“A pleasant, thoroughly conventional and rather sugary little story,


the conclusion of which is perfectly obvious by the time one has
finished the first chapter, is Mary Dillon’s new novel.”

+ N Y Times 25:126 Mr 14 ’20 350w

DILNOT, FRANK. England after the war. *$3


Doubleday 914.2

20–20324

England, says the author, is in a stage of transition and is entering


upon a new epoch. What this new epoch is likely to be does not enter
into the speculations of the writer who confines himself to sketching
the main features of England in their present state of transformation.
Among the contents are: The mood of the people; The governance of
England; The women; Business the keystone; Labour battling for
enthronement; Ireland; Britain overseas; From Lord Northcliffe to
Bernard Shaw; Where England leads; New programmes of life.

Booklist 17:108 D ’20


“The American reader will find much to instruct him in the
chapters dealing with the new leaders in politics and economics who
have arisen in England since the war.” J. C. Grey

+ Bookm 52:366 Ja ’21 400w

“If he is not profound nor subtle nor concise, he is never dull and
seldom altogether commonplace.” C. R. H.

+ Freeman 2:310 D 8 ’20 170w


+ Ind 104:248 N 13 ’20 50w
N Y Times p14 O 24 ’20 1750w

“Mr Dilnot has produced a book entertaining and, in the main,


thoughtful.”

+ Springf’d Republican p6 N 29 ’20 270w

[2]
DIMMOCK, F. HAYDN, ed. Scouts’ book of
heroes; with foreword by Sir Robert Baden Powell. il
*$2.50 Stokes 940.3

“A record of scouts’ work in the great war.” (Sub-title) Contents:


1914; Famous scouts in the war; Scout heroes of the army; Scout
heroes of the navy; Heroes of the air service; The heroes at home;
Just—a scout; Called to higher service. In addition sixty pages are
devoted to records of those who received medals, etc.
DINGLE, A. E. Gold out of Celebes. il *$1.75
(2½c) Little

20–8238

Jack Barry, an American seaman out of a job, is loafing about


Batavia, in the Dutch East Indies, when Tom Little, a traveling
salesman tired of the typewriter business, puts him on the track of
adventure. Little has undertaken to go into the interior in the
interests of Cornelius Houten, a Dutch trader, who has reason to
suspect one of his agents. Houten is looking for a skipper and Barry
meets his needs. The two Americans scent mystery from the outset.
In the first place there is the strange lady, Mrs Goring, who claims
acquaintance with them and asks passage on their ship. In the
second place there is something puzzling about the big soft-voiced
Dutch mate. There is also the relation between Leyden, the man they
are after, and Natalie Sheldon, the charming young missionary. And
the last is the point that matters most to Barry. On some of these
points the two are in doubt to the end, working often in the dark, but
fully deserving the rewards that finally come to them.

Booklist 16:347 Jl ’20


Cleveland p72 Ag ’20 50w

“The plot of ‘Gold out of Celebes’ reveals nothing particularly new.


The love interest is slight, but pleasing. It is the breezy way in which
this novel is written that carries it. The plot is a secondary matter
entirely, while the ‘red blood’ element, vivid enough at times, is
always kept discreetly within bounds.”
+ − N Y Times p23 Ag 8 ’20 650w
Springf’d Republican p11a Je 6 ’20
220w

DINNING, HECTOR W. Nile to Aleppo. il


*$7.50 Macmillan 940.42

“The author of this book is a captain in the Australian forces which


fought in the great war. Mr McBey was the official artist which
followed the army of the Egyptian expeditionary force and the two
together, the soldier and the painter, collaborated to produce a
volume which is not a book of the war, nor yet a book of travel, but a
combination of the two. The story begins at Taranto, away down in
far southern Italy. Here the force was simply in camp near the town,
and presumably a transport appeared in the harbor, her nose
pointing eastward and business opened up. Thence through
Palestine and Syria. The trail leads around the hills of Judea, through
its ravines and past its straggling orchards, and, at length, to the
Holy City. He takes us through the valley of the Jordan to Ludd; and
from Ludd to Damascus and thence to Homs; and from Homs to
Aleppo, where the train traversed the burning sands to Beyrouth.”—
Boston Transcript

“Captain Dinning is a born observer. He always contrives to see


what is worth seeing and to record it vividly, sometimes in the slangy
style of his diary, sometimes in the finished manner of his later
chapters. Occasionally his judgments are open to criticism.”

+ Ath p759 D 3 ’20 950w


“The whole is an intensely breezy narrative, written by a man who
understands well the use of his eyes and of the English language to
interpret what he sees.” E. J. C.

+ Boston Transcript p4 O 20 ’20 600w

“Mr McBey’s pen sketches deserve more than passing mention, for
he is no mere illustrator. His economy of line and his ability to
convey an indelible impression of these arid stretches of Palestinian
landscape, their undeniable color and beauty, are more than
fortuitous.”

+ N Y Evening Post p24 D 4 ’20 360w


+ Spec 124:245 Ag 21 ’20 300w

DIXON, THOMAS. Man of the people. *$1.75


Appleton 812

20–13190

This drama of Abraham Lincoln has one purpose: to show


Lincoln’s fight to save the Union. We see Lincoln on the one hand as
the friend of the oppressed and dispensing pardons according to a
deeper sense of justice than is apparent on the surface. On the other
hand we see him deal with implacable firmness to carry through his
great conviction that the Union must be saved. The whole is divided
into a prologue, three acts, and an epilogue.

“Melodramatic and inferior to Drinkwater’s play.”


+ − Booklist 17:61 N ’20

DOBIE, CHARLES CALDWELL. Blood red


dawn. *$1.75 (2c) Harper

20–10053

A story of San Francisco following the fortunes of a girl who has


her own living and her own way to make in the world. She is in turn a
stenographer in a business office, accompanist for a singer at
fashionable at-homes and Red cross concerts, and entertainer in a
Greek restaurant. The latter occupation takes her “south of Market”
and into a new social world where she meets the foreign born and
has a glimpse of the alien point of view on American life. Two men
have a part in her story, Ned Stillman, descendant of native stock,
and Dr Danilo, a Serbian doctor. The war is in progress at the time.

“Although it has merit, it is a rather tepid performance. Mr Dobie’s


faults, the faults of the novice, grow less noticeable as he warms to
his theme. But he fails to warm sufficiently. He handles all his
situations and incidents with the indifferent care of a man following
a recipe. In spite of its riotous title, ‘The blood red dawn’ is
distressingly smug.” M. A.

+ − Freeman 1:525 Ag 11 ’20 360w

“Well constructed romance. The author knows his San Francisco.


This story—his first full length book—gives a graphic and colorful
picture of intrigue in the foreign quarter of that city of lights.”
+ N Y Times 25:301 Je 6 ’20 420w

“The characters fail to transcend or to sublimate the type; are all,


by a shade, a little second-rate or common; and the result is a
disappointing effect, in a book containing so much veracious detail of
confused mediocrity. The opening chapters give us hope of creative
realism, and we seem to have received, when all is done, a
disconcerting blend of naturalism and romance.” H. W. Boynton

− Review 3:272 S 29 ’20 250w

DODD, MRS ANNA BOWMAN (BLAKE). Up


the Seine to the battlefields. il *$3 (3c) Harper 914.4

20–7447

“Why is it that not one traveler in a thousand, no, nor in tens of


thousands has known the Seine shores as the shores of the Hudson
are known—as the Rhine, for so many years, has been known and
sung? Few Frenchmen even are fully aware of the wonders and
beauties which a trip up the Seine will yield.” (Introd.) As one of the
effects of the war has been the discovery of the Seine’s commercial
possibilities the author fears that in a few short years the Seine will
no longer be “the lovely river of beauty.” She therefore proposes to
immortalize its many surprises in scenic and architectural splendors
in a book which is profusely illustrated from engravings and
paintings.
+ Booklist 17:27 O ’20

“The book is intensely interesting both for its geography and its
history.”

+ Cath World 111:694 Ag ’20 220w

“The book is an amiable introduction to modern French history;


and if Mrs Dodd’s manner is a trifle too intense for her subjects,
there is at least not a tiresome page in the whole volume.” M. F. Egan

+ − N Y Times 25:285 My 30 ’20 150w

“Such a volume as the present will be grateful reading to all those


who love France and who feel the force of the old days, no matter
how modern some parts of new France have become.”

+ Outlook 125:223 Je 2 ’20 80w

“Unfortunately Mrs Dodd’s style is too hasty—at points it is


positively slipshod—to carry the finer effects that would make for
complete success in such work as this.”

+ − Review 2:681 Je 30 ’20 300w

DODD, LEE WILSON. Book of Susan. *$2


Dutton
20–11147

“Susan is frankly a phenomenal child. After her stupid, bestial


father murders the woman with whom he is living, Susan is adopted
by a wealthy and cultured bachelor, and grows up to be a brilliant
woman who holds her own in his circle of scholarly and fashionable
friends.” (Outlook) “She is now old enough to be in love with [her]
guardian, who is, of course, in love with her. But Ambo’s two special
friends, a Yale professor and a New York radical, also love Susan.
Finally it takes a bomb from a Gotha in the streets of Paris to bring
Susan to the point of letting Ambo know that she loves him alone.”
(Bookman)

“The reason why one reader is unimpressed by this plot, and even
finds it absurd, is because he is unimpressed by Susan. She is over-
clever, over-sprightly. So, for that matter, is the whole book.” H. W.
Boynton

− Bookm 52:68 S ’20 500w

“For all its Stevensonesque touches, for all the moments when one
glimpses a mind like Pater’s, or a glimmer of Ibsen, through the
palings of the back fence, as it were, one has nothing, except a couple
of characters—say five—to take away with one. The first part of the
story is delightful.”

+ − Boston Transcript p6 Ag 7 ’20 430w

“The book is much above the average novel, and the author’s
insight into feminine psychology quite remarkable. Moreover, it has
the great quality of interest.”
+ Lit D p114 N 6 ’20 1650w

“Mr Dodd’s style is in another world from the gritty slovenliness of


the average story; the earlier part of his book is filled with ripe and
intense characterizations; the interpolated passages of criticism and
verse are mellow and delightful. But the fable of the book is the fable
of ‘Daddy Longlegs,’ not only in fact but, beneath all appearances of
intellectual subtlety and integrity, in tendency and spirit. We can
only hope that Mr Dodd will soon give us another novel in which his
grace of style and temper shall serve to express an austerer strain of
thought and imagination—austerer because it is truer and truer
because it does not compromise.”

+ − Nation 111:329 S 18 ’20 620w

“The people in this narrative are the genuine variety. The character
of Susan is a well rounded one. There is nothing commonplace about
‘The book of Susan.’ Mr Dodd writes in a fresh, entertaining style and
has shaped his materials with no little skill.”

+ N Y Times 25:28 Jl 4 ’20 530w

“In character depiction, in the give and take of dialogue, and in the
incidents, the novel is more arresting than the majority of the
American novels of the season.”

+ Outlook 126:67 S 8 ’20 100w

DODD, WILLIAM EDWARD. Woodrow Wilson


and his work. *$3 (4c) Doubleday
20–26482

“This portrait of Woodrow Wilson is designed to be a brief history


of recent times as well as a chronicle of a great career. It aims to set
the man in his historical background and to explain the trend of
American life during a momentous period of world history.” (Introd.)
“It is surely a record unsurpassed; and the fame of the man ... can
never be forgotten, the ideals he has set and the movement he has
pressed so long and so ably can not fail.” Contents: Youth and early
environment; The new road to leadership; New wine in old bottles;
The great stage; From Princeton to the presidency; The problem; The
great reforms; Wars and rumours of wars; The election of 1916; The
United States enters the war: “We are provincials no longer”;
Roosevelt or Wilson; The great adventure; The day of reckoning; The
treaty and the League; Index.

Booklist 16:343 Jl ’20

“It is fair to admit that Mr Dodd does his work with knowledge,
skill, and an independent judgment in details.” J. A. Hobson

+ Nation 111:189 Ag 14 ’20 1250w

“Although I am seldom in complete agreement with Professor


Dodd, and often a horizon’s distance away from him, I find myself
forced to the conviction that this book offers the fullest and fairest
amount of Wilson and his work that I have seen, or am likely to see
in many a day.” Alvin Johnson

+ − New Repub 24:36 S 8 ’20 2250w


“Quite the most discriminating, comprehensive and just
appraisement of Woodrow Wilson that has yet been made.”

+ N Y Times p21 S 12 ’20 550w


R of Rs 61:558 My ’20 230w

“As fairly as seems humanly possible, Prof. Dodd has maintained


the historical point of view, endeavoring to weigh all evidence
impartially, and taking counsel from friends and foes alike, and from
the president himself on various occasions.”

+ Springf’d Republican p8a S 19 ’20


1100w

Reviewed by W: L. Chenery

+ Survey 45:168 O 30 ’20 520w


+ The Times [London] Lit Sup p653 O 7
’20 110w

DODGE, HENRY IRVING. Skinner makes it


fashionable. il *$1 (5c) Harper

20–6285

“Meadeville was a suburban town of the highest class. It was made


up of plutocrats, prigs, good people, snobs, mean people, new-rich,
new-poor.” Perhaps William Manning Skinner was one of the “mean
people,” for he set the whole town by the ears in a sensational way.
He knew how human they all were, how they dreaded, most of all,
not to be in the height of fashion and not to do what the “best people”
did. So he set the ball a-rolling that was to change the riot of
extravagance in vogue among the newly-rich to a veritable riot of
simple living. And how he and his good wife, Honey, chuckled over it
all!

“Not as amusing as the earlier ‘Skinner’ stories.”

+ − Booklist 16:312 Je ’20


Cleveland p71 Ag ’20 50w

“The little book is a reservoir of bubbling humor, carrying with it a


lesson well worth heeding in these days.”

+ N Y Times 25:302 Je 6 ’20 550w

“A genuinely funny story.”

+ Springf’d Republican p13a Ap 25 ’20


260w

DODGE, LOUIS. Whispers. *$1.75 Scribner

20–6862

“Louis Dodge’s new hero is named Robert Estabrook, and it is


Beakman, the very unpleasant city editor of The News, who gives him
the nickname of ‘Whispers’ because of his defective speech.
Estabrook—or Whispers—arrives in Missouri City shortly after the
murder of old Pheneas Drumm, a dealer in masks and costumes,
reputed to be very rich, and goes first to the office of the highly
successful News. But not liking the looks either of Beakman or of The
News office—whereby he shows his good sense—he decides to try to
get a position on the rival paper, The Vidette. This he does. Also,
Whispers promises to solve the mystery of the Drumm murder
within two days. Of course he makes good.”—N Y Times

Booklist 16:280 My ’20


+ Cath World 112:121 O ’20 90w

“Mr Dodge has written a uniquely interesting book. The plot itself
is simple enough, the dénouement not surprising; but from the very
beginning a subtler interest is aroused by the genuine appeal of the
characters revealed and the picturesque quality of the city newspaper
life.”

+ − N Y Evening Post p3 My 1 ’20 480w


+ − N Y Times 25:240 My 9 ’20 350w

“Once the main thread begins to unwind, ‘Whispers’ plunges into


an exciting series of dangers. Either through his own, or the author’s
clumsiness, Estabrook does not display much craft in his sleuthing.”

+ − Springf’d Republican p11a Je 27 ’20


250w
“The long arm of coincidence is applied to its limit, but the story is
entertaining.”

+ Wis Lib Bul 16:237 D ’20 20w

DODWELL, C. E. W. Righteousness versus


religion. $2 Stratford co. 201

20–14752

In opposing righteousness to religion the author does not direct


his criticism against Christianity in the sense of the “righteousness,
simplicity and beauty” of the teachings of Christ, but against
dogmatic religion which he makes responsible for everything that
has gone wrong with the world. He charges it with promulgating
“mischievous errors, falsities and debasing superstitions, ignorance,
hypocrisy and narrow-minded bigotry and intolerance.” The contents
are: Religion; Many religions; The Christian religion; The works of
religion; The Bible; Righteousness. The postscript has paragraphs on
the future of the “Church” and “Religion”; on the effects of
Catholicism on Spain and Ireland; on the war; and a recommended
list of books for further reading.

“Of his tremendous sincerity there can be no doubt. It might fairly


be urged that the book fails to accord to its object of attack the usual
privilege of being judged by its best rather than by its worst. Yet his
assaults are put forward in such a whole-hearted and self-convinced
manner that what he says is not calculated to wound or affront.” L. S.

+ − Boston Transcript p6 N 3 ’20 1100w


[2]
DOLE, CHARLES FLETCHER. Religion for
the new day. *$2 (2½c) Huebsch 204

We are facing a momentous crisis in history of which some of the


profound facts are: insincerity in religion, and the parting of the
roads to which all churches alike have come. The object of the book is
to set forth a mode of religion that will now and henceforth serve, not
only for Christendom but for all mankind, as the spiritual gospel and
working force for a humane and democratic world and that,
wherever it is applied, can transform life. It neither antagonizes nor
favors any existing institution but insists on the need of some form of
social expression of the best that is in man. The contents fall into
sections: Signs of the times: how the facts point; The course of
spiritual evolution; The victorious goodness; The new civilization;
The religion within.

DOMBROWSKI, ERIC. German leaders of


yesterday and today. *$2 (2½c) Appleton 920

20–26749

These pictures of “uncensored celebrities of Germany” are painted


with much spirit, a satirical brush and much intimate knowledge of
the personalities and historical facts. Among the subjects are:
Friedrich Ebert; Erich Ludendorff; Theodor Wolff; Mathias
Erzberger; Georg Ledebour; Alfred von Tirpitz; Wilhelm II; Philip
Scheidemann; Von Bethmann-Hollweg; Ernst Graf zu Reventlow;
Hugo Haase; Richard von Kühlmann; Georg Graf von Hertling; Rosa
Luxemburg; Maximilian von Baden; Kurt Eisner; Karl Liebknecht;
Gustav Noske.
+ Booklist 17:29 O ’20

“Dombrowski’s power is nothing short of Carlylean.”

+ N Y Times p1 Ag 8 ’20 4100w

“As often happens in the case of sidelights, Dombrowski


illuminates only spots. He shows only this or that feature of his men
and women, leaving in the shadows many other features which in
fairness should be revealed. ‘German leaders of yesterday and today’
is highly entertaining, but its value is certainly not higher than that of
many books of the hour.”

+ − Review 3:538 D 1 ’20 170w

“Some of the sketches are satirical and frankly inimical. Almost all
are enlightening and amusing.”

+ R of Rs 62:334 S ’20 80w

“Eric Dombrowski’s ‘German leaders of yesterday and today’ has


the requisite impartiality and shows also an abundance of keen
insight. But these sketches were evidently written with some subtlety
as well as vivacity, and while the translator has contrived to preserve
the author’s spirit, the English is often confused or incorrect.”

+ − Springf’d Republican p11a Ag 8 ’20


600w
“Dombrowski tries to be clever and rarely succeeds, but he paints
vivid pictures of forty-five political leaders, publicists, and agitators,
which to the average American will prove illuminating.” C: Seymour

+ − Yale R n s 10:420 Ja ’21 160w

[2]
DOMVILLE-FIFE, CHARLES WILLIAM.
States of South America, the land of opportunity; a
complete geographical, descriptive, economic and
commercial survey. il *$5 Macmillan 918

“This work, which has been greatly enlarged and re-written since
its first appearance, now forms a comprehensive volume of
illustrated reference to the whole of the states of South America, and
not only as before, a few of the most important Latin-American
states.” (The Times [London] Lit Sup) Notice of the first edition
appears in the 1911 Digest Annual.

“The proportion of bare facts to textual comment is well studied


from beginning to end.”

+ N Y Evening Post p11 D 31 ’20 250w

“Aside from its mass of statistics and general information, the


chief value of this volume to the American business man lies in the
fact that it introduces him, with admirable candor, to the methods of
his chief competitor.” B. R. Redman

+ N Y Times p15 Ja 16 ’21 840w


The Times [London] Lit Sup p707 O
’20 40w

DOMVILLE-FIFE, CHARLES WILLIAM.


Submarine warfare of today. il *$2.25 Lippincott
940.45

20–26104

The book contains “records of many romantic events on England’s


sea frontier, 1914–1918. There are descriptions of the organization
and preparation of the new navy to meet the submarine menace, and
of the new weapons devised. Much attention is given to details and
explanation of how things were done; there is an examination of the
effect of the submarine on naval strategy.”—Booklist

Booklist 16:164 F ’20


“His book is full of romance as well as of facts. The
only criticism which is permissible is that the book is
somewhat lacking in detailed description of the
instruments used.”

+ − Nature 105:36 Mr 11 ’20 240w

“‘Submarine warfare of today’ is a disappointing book. Based on


inadequate information, and characterised by annoying repetition, it
falls a long way short of the claims which are made by the publishers’
note on the wrapper. If the author is ill-informed as to his facts, not
less displeasing is his English.”

− Sat R 129:283 Mr 20 ’20 510w

“Mr Domville-Fife’s is a book to be carefully read by all those who


look forward to the promised formal histories of the navy’s share in
the war.”

+ − The Times [London] Lit Sup p706 D 4


’19 850w

DOMVILLE-FIFE, CHARLES WILLIAM.


Submarines and sea power. *$2.50 Macmillan 359

(Eng ed 19–18399)

“In this treatise the author examines the effect of the submarine on
naval strategy, not as a mere matter of history, but as a guide to
preparation for the next naval war.” (Ath) “He says that, though we
hope that the League of nations will make war impossible in future,
we have no right whatever to rely on this blessed consummation.
Until we are entitled to dismiss war as an exhausted evil, which can
never return, we must either keep our place on the sea or sink to live
at the mercy of other nations. Will the submarine make it more
difficult for us to retain our position or not? That is the question
which he endeavours to answer.” (The Times [London] Lit Sup)
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookmass.com

You might also like