Java How to Program, Fifth Edition

3.84 avg rating
( 819 ratings by Goodreads )
 
9780131016217: Java How to Program, Fifth Edition

The complete, authoritative DEITELaA A LIVE-CODEaA A introduction to programming with the JavaaA A 2 Platform Standard Edition, JDBCTaA A , Servlets and JSPaA A JavaaA A has revolutionized software development with multimedia-intensive, platform-independent, object-oriented code for Internet-, Intranet- and Extranet-based applications. This fifth edition of the world's most widely used Java textbook explains Java's extraordinary capabilities, presents an optional object-oriented design and implementation experience with the Unified Modeling Language (UML) from the Object Management GroupaA A and introduces n-tier Webapplications development with JDBCaA A , Servlets and JSPaA A . Dr. Harvey M. Deitel and Paul J. Deitel are the founders of Deitel & Associates, Inc., the internationally recognized corporate training and content-creation organization specializing in JavaaA A , C++, C, C#, Visual BasicsA (R), .NET, Visual C++A (R) .NET, XML, Python, Perl, Internet, Web and object technologies. The Deitels are the authors of several worldwide #1 programming-language textbooks, including Internet & World Wide Web How to Program, 2/e and C++ How to Program, 4/e.In Java How to Program, Fifth Edition the Deitels introduce the fundamentals of object-oriented programming in Java. Key topics include: *Applications/Applets *Swing GUI/Event Handling *Classes/Objects/Interfaces *Encapsulation/Inner Classes *OOP/Inheritance/Polymorphism *Data Structures/Collections *Files/Streams/Serialization/NIO *Networking/Client-Server/Internet/Web *JDBCaA A /Servlets/JavaServer PagesaA A *Graphics/Java 2DaA A /Images/Animation/Audio *Exceptions/Multithreading *(Optional) OOD/UML/Design Patterns Java How to Program, Fifth Edition includes extensive pedagogic features: *Hundreds of LIVE-CODEaA A programs with screen captures that show exact outputs *Extensive Internet and World Wide Web resources to encourage further research *Hundreds of tips, recommended practices and cautions-all marked with icons for: *Good Programming Practices *Software Engineering Observations *Performance Tips *Portability Tips *Look-and-Feel Observations *Error-Prevention Tips *Common Programming Errors Java How to Program's teaching resources include Web sites (www.deitel.com, www.prenhall.com/deitel and www.InformIT.com/deitel) with the book's code examples (also on the enclosed CD) and information for faculty, students and professionals; an optional CD (Java 2 Multimedia Cyber Classroom, 5/e) with solutions to about half the exercises in Java How to Program, 5/e, interactivity features-including hyperlinks and audio walkthroughs of the code examples; and access to the authors at deitel@deitel. com For information on Deitel instructor-led seminars offered worldwide, and to subscribe to the DEITELaA A Buzz ONLINE email newsletter, visit: www.deitel.com

"synopsis" may belong to another edition of this title.

Excerpt. © Reprinted by permission. All rights reserved.:

Welcome to Java! At Deitel & Associates, we write college-level programming-language textbooks and professional books and work hard to keep our books up-to-date. Writing Java How to Program, Fifth Edition, (5/e for short), was a joy. This book and its support materials have everything instructors and students need for an informative, interesting, challenging and entertaining Java educational experience. As the book goes to publication, it is compliant with the latest version of Java—the Java 2 Platform, Standard Edition (J2SE), version 1.4.1—and with object-oriented design using the latest version of the UML (Unified Modeling Language) from the Object Management Group (OMG). We tuned the writing, the pedagogy, our coding style, the book's ancillary package and added a substantial treatment of developing database-driven Internet- and Web-based applications. We moved the Tour of the Book to the Preface. The tour will help instructors, students and professionals get a sense of the rich coverage the book provides of Java object-oriented programming, object-oriented design with the UML, and developing Internet- and Web-based applications. If you' are evaluating the book, please be sure to read the Tour of the Book, which starts on page xxxvi.

Whether you are an instructor, a student, an experienced professional or a novice programmer, this book has much to offer. Java is a world-class programming language for developing industrial-strength computer applications for devices ranging from cell phones and PDAs to the largest enterprise servers. We carefully audited the manuscript against the Java Language Specification, which defines Java. As a result, the programs you create by studying this text should work with any J2SE 1.4.1 compatible Java platform.

In this Preface, we overview Java How to Program, 5/e's comprehensive suite of educational materials that help instructors maximize their students' Java learning experience. We explain conventions we use, such as syntax coloring the code examples, "code washing" and highlighting important code segments to help focus students' attention on the key concepts introduced in each chapter. We overview the new features of Java How to Program, 5/e, including our enhanced treatment of object-oriented programming, Web-application development with servlets and JSP, the enhanced optional elevator-simulation object-oriented design (OOD) case study with the UML, the overview of design patterns and the extensive use of UML diagrams that have been upgraded to UML version 1.4 standards.

Prentice Hall has bundled a CD with the text that contains Sun Microsystem's J2SE 1.4.1 Software Development Kit (J2SDK) and their Sun ONE Studio 4 (Community Edition), integrated development environment (IDE). To further support novice programmers, we offer several free DIVE-INTOSeries publications that explain how to compile, execute and debug Java programs using the J2SDK, Sun ONE Studio (Community Edition) and Borland's JBuilder Personal edition. These publications are located at www.deitel.com/books/downloads.html with the resources for Java How to Program, 5/e.

We overview the complete package of ancillary materials available to instructors and students using Java How to Program, 5/e. These include an Instructor's Resource CD with solutions to most of the book's chapter exercises and a Test-Item File with hundreds of multiple-choice questions and answers. Additional instructor resources are available at the book's Companion Web Site ( www.prenhall.com/deitel ), which includes a Syllabus Manager and customizable PowerPoint® Lecture Notes. Numerous support materials are available for students at the Companion Web Site, as well. For instructors who want to hold closed-lab sessions f or highly structured homework assignments), we provide a lab manual, Java in the Lab, Lab Manual to Accompany Java How to Program, Fifth Edition. This publication includes carefully constructed Prelab Activities, Lab Exercises and Postlab Activities for a closed lab setting. Instructors can obtain the solutions manual to Java in the Lab from their regular Prentice Hall representatives.

We overview The Java 2 Multimedia Cyber Classroom, 5/e—an interactive, multimedia CD-based version of the book. This learning aid provides extensive interactivity features including hyperlinking, text search, audio "walkthroughs" of programs, Flash® animations and hundreds of exercises and solutions. We describe how to order both the Cyber Classroom and The Complete Java 2 Training Course, 5/e, boxed product, which contains the Cyber Classroom and the textbook later in the preface.

We discuss several DEITEL™ e-learning initiatives, including an explanation of Deitel content available for the Blackboard, CourseCompass and WebCT Course Management Systems, each of which supports Java How to Program, 5/e. Premium CourseCompass, which offers enhanced Deitel content based on The Java 2 Multimedia Cyber Classroom, 5/e, will be available for Summer 2003 courses.

In preparation for this edition, Java How to Program, 4/e, was reviewed by 35 distinguished academics and industry professionals. After applying their comments, the manuscript for Java How to Program, 5/e, was reviewed by 44 distinguished academics and industry professionals. We list all the reviewers names and affiliations in the acknowledgements. The Preface concludes with information about the authors and about Deitel & Associates, Inc. Please send an e-mail to deitel@deitel.com , if you have questions as you read this book; we will respond promptly. Please visit our Web site, www.deitel.com , regularly and be sure to sign u15 for the DEITEL™ BUZZ ONLINE email newsletter at www.deitel.com/newsletter/subscribe.html . We use the Web site and the newsletter to keep our readers current on Java How to Program, 5/e, and all other DEITEL™ publications and services.

New Features in Java How to Program, Fifth Edition

This edition contains many new features and enhancements including:

Full-Color Presentation
This book is in full color to show programs and their outputs as they typically appear on a computer screen. We syntax color all the Java code, as do most Java integrated-development environments and code editors. This greatly improves code readability—an especially important goal, given that this book contains over 23,000 lines of code. Our syntax-coloring conventions are as follows:

  • comments appear in green
  • keywords appear in dark blue
  • errors and JSP scriptlet delimiters appear in red
  • constants and literal values appear in light blue
  • all other code appears in black

Code Highlighting
We have added extensive code highlighting. In our code walkthroughs, we have eliminated most of the "redundant" code snippets that appeared inline in the text in earlier editions. We kept them in the earliest portion of the book as a pedagogic device to help novices. We want the reader to see all new code features in context, so from Chapter 4 forward, our code walkthroughs simply refer to the line numbers of the new code segments inside complete source programs. To make it easier for readers to spot the featured segments, we highlight them in bright yellow. This helps students review the material rapidly when preparing for exams or labs.

"Code Washing"
Code washing is our term for applying extensive comments, using meaningful identifiers, applying indentation and using vertical spacing to separate meaningful program units. This process results in programs that are much more readable and self-documenting. We have done extensive "code washing" of all the source code programs in the text, the lab manual, the ancillaries and the Cyber Classroom.

Tuned Treatment of Object-Oriented Programming in Chapters 9 and 10
This is one of the most significant improvements in this new edition. We performed a high-precision upgrade of Java How to Program, 4/e, Chapter 9 and split it into two chapters. The improvements make the material clearer and more accessible to students and professionals, especially those studying object-oriented programming for the first time.

Chapter 9, Object-Oriented Programming: Inheritance. The new Chapter 9 carefully walks the reader through a five-example sequence that demonstrates private data, protected data and software reuse via inheritance. We begin by demonstrating a class with private instance variables and public methods to manipulate that data. Next, we implement a second class with several additional capabilities. To do this, we duplicate much of the first example's code. In our third example, we begin our discussion of inheritance and software reuse—we use the class from the first example as a superclass and inherit its data and functionality into a new subclass. This example introduces the inheritance mechanism and demonstrates that a subclass cannot access its superclass's private members directly. This motivates our fourth example, in which we introduce protected data in the super-class and demonstrate that the subclass can indeed access the protected data inherited from the superclass. The last example in the sequence demonstrates proper software engineering by defining the superclass's data as private and using the superclass's public methods (that were inherited by the subclass) to manipulate the superclass's private data from the subclass. We follow the five-part introduction with a three-level class hierarchy that employs the software engineering techniques introduced earlier in the chapter. The chapter closes with a discussion of software engineering with inheritance.

Chapter 10, Object-Oriented Programming: Polymorphism. The new Chapter 10 builds on the inheritance concepts presented in Chapter 9 and focuses on the relationships among classes in a class hierarchy. Chapter 10 uses a three-example sequence to present the powerful processing capabilities that these relationships enable. We begin with an example that illustrates the "is-a" relationship between a subclass object and its superclass type. This relationship enables the subclass object to be treated as an object of its superclass. We show that we are able to assign a subclass object's reference to a superclass variable and invoke the superclass's methods on that object. This example uses polymorphism, which enables a program to process objects of classes related by a class hierarchy as objects of their superclass type. When a method is invoked via a superclass variable, the subclassspecific version of that method is invoked. In our second example, we demonstrate that the reverse is not true—a superclass object is not considered to be an object of its subclass type—and we show that compiler errors occur if a program attempts to manipulate a superclass object in this manner. Our third example demonstrates that the only methods which can be invoked through a superclass variable are those methods defined by the superclass type. The example shows that attempts to invoke subclass-only methods result in compilation errors. The chapter continues with a case study on polymorphism in which we process an array of variables that contain references to objects. All the objects referenced by the elements of the array have a common abstract superclass containing the set of methods common to every class in the hierarchy. We conclude with a case study that demonstrates how a program that processes objects polymorphically can still perform type-specific processing by determining the type of the object currently being processed.

Java New HO (NIO) APIs
Java's New I/O APIs are significant new additions to J2SE 1.4. We overview portions of these APIs in sections of three chapters. Section 11.8 demonstrates NIO's regular expression capabilities, which enable programs to search strings for character patterns. Section 17.13 introduces NIO's high-performance I/O classes that enable developers to take advantage of buffers, channels, charsets and more. This section also presents an example of using channels and buffers to write data to, and read data from, a file. Section 18.11 continues our discussion of the NIO APIs with an introduction to selectors and non-blocking I/O for implementing high-performance network servers. We then implement a distributed chat program that demonstrates these capabilities. Sections 11.8 and 17.13 also provide Web links for further study of the NIO APIs.

Database and Web-Applications Development with JDBC, Servlets and JSP
By popular demand, we have returned several topics to Java How to Program, Fifth Edition. Chapter 23, Java Database Connectivity with JDBC, demonstrates how to build data-driven applications with the JDBC™ API. Chapter 24, Servlets, and Chapter 25, JavaServer Pages™ (JSP), expand our treatment of Internet and Web programming topics and have everything readers need to begin developing their own Web-based applications that will run on the Internet! Readers will learn how to build so-called n-tier applications, in which the functionality provided by each tier can be distributed to separate computers across the Internet or executed on the same computer. In particular, we build a three-tier Web-based survey application and a three-tier Web-based guestbook application. Each application's information is stored in the application's data tier—in this book, a database implemented with IBM's Java-based Cloudscape database product (a trial version is on the CD that accompanies this book). The user enters requests and receives responses at each application's client tier, which is typically a computer running a Web browser such as Microsoft Internet Explorer or Netscape. Web browsers, of course, know how to communicate with Web sites throughout the Internet. The middle tier contains both a Web server and one or more application-specific servlets (in the case of our survey application) or JavaServer Pages (in the case of our guestbook application). We use Apache's Tomcat Web server as our application server for these examples. Tomcat, which is the reference implementation for the servlets and JavaServer Pages technologies, is included on the CD that accompanies this book and is available free for download from www.apache.org . Tomcat communicates with the client tier across the Internet using the HyperText Transfer Protocol (HTTP). We discuss the crucial role of the Web server in Web programming and provide many examples demonstrating interactions between a Web browser and a Web server.

Unified Modeling Language (UML)
The Unified Modeling Language™ (UML) has become the preferred graphical modeling language for designing object-oriented systems. In Java How to Program, Fourth Edition, we used the UML in optional sections only, and we used conventional flowchart segments and inheritance diagrams to reinforce the explanations. We have fully converted the diagrams in the book to be UML 1.4 compliant. In particular, we upgraded all the figures in the UML/OOD Elevator Simulation case study; we converted all the flowcharts in Chapters 4 and 5 on Control Statements, to UML activity diagrams; and we converted all the inheritance diagrams in Chapters 9, 10, 12-13 and 15 to...

"About this title" may belong to another edition of this title.

Top Search Results from the AbeBooks Marketplace

1.

Deitel, Paul J., Deitel, Harvey M.
Published by Prentice Hall (2002)
ISBN 10: 0131016210 ISBN 13: 9780131016217
New Paperback Quantity Available: 1
Seller:
Solr Books
(Skokie, IL, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2002. Paperback. Book Condition: New. Ships Fast! Satisfaction Guaranteed!. Bookseller Inventory # mon0000525375

More Information About This Seller | Ask Bookseller a Question

Buy New
£ 16.22
Convert Currency

Add to Basket

Shipping: £ 3.03
Within U.S.A.
Destination, Rates & Speeds

2.

Deitel, H. M.; Deitel, P. J.
Published by Pearson Prentice Hall, Upper Saddle River, NJ (2003)
ISBN 10: 0131016210 ISBN 13: 9780131016217
New Softcover Quantity Available: 4
Seller:
a2zbooks
(Burgin, KY, U.S.A.)
Rating
[?]

Book Description Pearson Prentice Hall, Upper Saddle River, NJ, 2003. Softcover. Book Condition: New. 5th Edition. Book is New, Excellent condition. Includes Sealed CD. Multiple copies available this title. Quantity Available: 4. Category: Computers & Internet; ISBN: 0131016210. ISBN/EAN: 9780131016217. Pictures of this item not already displayed here available upon request. Inventory No: 1560781456. Bookseller Inventory # 1560781456

More Information About This Seller | Ask Bookseller a Question

Buy New
£ 25.17
Convert Currency

Add to Basket

Shipping: £ 3.53
Within U.S.A.
Destination, Rates & Speeds

3.

Harvey M. Deitel; Paul J. Deitel
Published by Prentice Hall (2002)
ISBN 10: 0131016210 ISBN 13: 9780131016217
New Paperback Quantity Available: 1
Seller:
Irish Booksellers
(Rumford, ME, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2002. Paperback. Book Condition: New. book. Bookseller Inventory # M0131016210

More Information About This Seller | Ask Bookseller a Question

Buy New
£ 29.23
Convert Currency

Add to Basket

Shipping: FREE
Within U.S.A.
Destination, Rates & Speeds

4.

Harvey M. Deitel, Paul J. Deitel
Published by Prentice Hall (2002)
ISBN 10: 0131016210 ISBN 13: 9780131016217
New Paperback Quantity Available: 1
Seller:
Ergodebooks
(RICHMOND, TX, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2002. Paperback. Book Condition: New. 5th. Bookseller Inventory # DADAX0131016210

More Information About This Seller | Ask Bookseller a Question

Buy New
£ 26.29
Convert Currency

Add to Basket

Shipping: £ 3.03
Within U.S.A.
Destination, Rates & Speeds

5.

Deitel, Harvey M., Deitel, Paul J.
Published by Prentice Hall (2002)
ISBN 10: 0131016210 ISBN 13: 9780131016217
New Paperback Quantity Available: 2
Seller:
Murray Media
(North Miami Beach, FL, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2002. Paperback. Book Condition: New. Never used!. Bookseller Inventory # P110131016210

More Information About This Seller | Ask Bookseller a Question

Buy New
£ 32.57
Convert Currency

Add to Basket

Shipping: £ 1.51
Within U.S.A.
Destination, Rates & Speeds