Core Version
Comprehensive Version
Introduction to Java Programming, 7E
 
Y. Daniel Liang

What is New in this Edition?

This edition substantially improved Introduction to Java Programming, Seventh Edition. The major improvements are as follows:

Complete Revision

The book is completely revised in every detail to enhance clarity, content, presentation, examples, and exercises. Every section has been reworked.

Problem-Driven

Each chapter begins with a problem that introduces the type of the problems covered in the chapter.

Focus on Problem Solving

Non-essential language topics are moved to the Companion Web site so that students can focus on learning problem solving and programming techniques. These topics include the & and | operators, the discussion on how expressions are evaluated internally in Java, regular expressions, initialization blocks, how to package Java projects into archive files, etc.

Wide Variety of New Examples

The book provides a variety of new examples (game, science, financials, and math) to stimulate student interest in programming in early chapters. For example, the new guess number, guess birth date, and Sudoku examples are provided in Chapters 3-6.

Wide Variety of New Exercises

Many new exercises are provided throughout the book. The exercises cover problems in game, science, financials, and math.

Separate GUI Sections

The text introduces both console input using the Scanner class and GUI input using the JOptionPane class in Chapters 1-6. For consistency and ordering flexibility, the GUI examples are placed in separate sections and may be omitted.

Design Patterns

Design patterns are introduced throughout the book

New Chapter 9

Chapter 7 in the 6E is split into two chapters Chapter 7 and Chapter 9. The new Chapter 7 introduces objects and classes and Chapter 9 focuses on class design.

Java 6 splash screen

Java 6 splash screens is introduced in §13.10, “Image Icons.”.

New Data Structures Chapters

Chapter 21, “Generics,” presents an in-depth coverage on generics. Generics is now covered before Java Collections Framework so it can be incorporated with the data structures. Chapter 23, “Algorithm Efficiency,” is brand new to use many concrete examples to introduce algorithm analysis and design. New chapters 27-28 introduce graph applications.

Using StringBuilder

The code using StringBuffer is now replaced by StringBuilder to improve efficiency, starting from Chapter 8.

New Concurrency Features

Thread pooling, locks, conditions, semaphores, blocking queues are introduced in Chapter 29.

SwingWorker

SwingWorker is introduced in Chapter 29 to perform time-consuming tasks on a thread separately from the event dispatch thread.

Auto-sort and Filtering

Java 6 auto-sort and filtering for JTable is introduced in Chapter 36.

New JDBC Features

New features such as automatic driver discovery, scrollable and updateable result sets, RowSet, callable statements are covered in Chapters 37 and 38.

JavaServer Faces

JavaServer Faces is introduced in Chapter 41.

Web Services

Web services is introduced in Chapter 42.

Correlation to the Previous Edition

This Book What's New Previous Book
Chapter 1 Introduction to Computers, Programs, and Java
  • New Exercise 1.2
Chapter 1
Chapter 2 Elementary Programming
  • Using Scanner for console input in the examples
  • New separate GUI section
  • New exercises 2.14-2.17
Chapter 2
Chapter 3 Selections
  • Revised problem-driven introduction
  • Using Scanner for console input in the examples
  • New separate GUI section
  • New game examples: Listing 3.5 Lottery.java, Listing 3.6, ComputeBMI.java, Listing 3.7 GuessBirthDate.java
  • New exercises 3.14-3.19
  • The rarely used & and | operators are moved to the Companion Web site
  • The advanced discussion on how expressions are evaluated internally is moved to the Companion Web site
Chapter 3
Chapter 4 Loops
  • Revised problem-driven introduction
  • Using Scanner for console input in the examples
  • New separate GUI section
  • New examples: Listing 4.1 GuessNumberOneTime.java, Listing 4.2 GuessNumber.java
  • New exercises 4.30-4.35
Chapter 4
Chapter 5 Methods
  • Revised problem-driven introduction
  • Using Scanner for console input in the examples
  • New §5.6 Modularizing Code
  • The section on Packages in the 6E is moved to the Companion Web site as a supplement
  • New exercises 5.26-3.31
Chapter 5
Chapter 6 Arrays
  • Revised problem-driven introduction
  • Using Scanner for console input in the examples
  • Three new examples: Listing 6.11, FindNearestPoints.java, Listing 6.12, Sudoku.java, Listing 6.13, and Listing 6.14 GuessBirthDateUsingArray.java
  • New exercises 6.30-6.32
Chapter 6
Chapter 7 Objects and Classes
  • New problem-driven introduction
  • The Loan class is moved to Chapter 9
  • New exercise 7.8
  • The optional end-of-chapter GUI section in the 6E is integrated in the chapter
Chapter 7 (partial)
Chapter 8 Strings and Text I/O
  • New problem-driven introduction
  • Using Scanner for console input in the examples
  • Using StringBuilder to replace StringBuffer
  • New exercises 8.25-8.32
  • Regular expression is moved to the Companion Web site as a supplement
  • The end-of-chapter GUI section in the 6E is replaced by an optional section on using JFileChooser
Chapter 8
Chapter 9 Thinking in Objects
  • New problem-driven introduction
  • New examples: Listing 9.3 UseBMIClass.java and Listing 9.4 BMI.java
  • New exercise 9.7 ATM Machine and exercises 9.11-9.15
Chapter 7 (partial)
Chapter 10 Inheritance and Polymorphism
  • The optional end-of-chapter GUI section in the 6E is integrated in the chapter
Chapter 9
Chapter 11 Abstract Classes and Interfaces
  • New problem-driven introduction
  • New Design Pattern Notes
  • New exercises 11.11-11.15
  • The optional end-of-chapter GUI section in the 6E is integrated in the chapter
Chapter 10
Chapter 12 Object-Oriented Design
  • Using Scanner for console input in the examples
  • The sections on sequence diagrams and statechart diagrams are moved to the Companion Web site as supplements
  • New §12.9 on Design Patterns
Chapter 11
Chapter 13 GUI Basics
  • New JDK 1.6 splash screen notes
  • New exercise 13.9
Chapter 12
Chapter 14 Graphics
  • New problem-driven introduction
  • New Exercises 14.22-14.23
Chapter 13
Chapter 15 Event-Driven Programming
  • New problem-driven introduction
  • New Listing 15.4, ControlBall.java
  • Delete the first example in the 6E to avoid redundancy
  • New exercises 15.3, 15.16-15.29
Chapter 14
Chapter 16 Creating User Interfaces
  • New problem-driven introduction
Chapter 15
Chapter 17 Applets and Multimedia
  • New problem-driven introduction
  • New exercises 17.24-17.30
  • The section on how to package Java projects into archive files is moved to the Companion Web site
Chapter 16
Chapter 18 Exception Handling
  • New problem-driven introduction
  • Revised most of the examples in this chapter
  • Assertion in the previous edition has been moved to the Companion Web site
Chapter 17
Chapter 19 Binary I/O
  • New exercises on splitting, combining file, and on encryption and decryption 19.10-19.15
Chapter 18
Chapter 20 Recursion
  • New problem-driven introduction
  • New §20.6, "Finding the Directory Size"
  • New §20.9, "Eight Queens problem"
  • New exercises 20.24-20.33
Chapter 19
Chapter 21 Generics
  • New §21.8 Erasure and Restrictions on Generics
  • Generics are incorporated from this chapter on
  • New exercises 21.1-21.9
Chapter 21
Chapter 22 Java Collections Framework
  • New exercises 22.11-22.15
  • Generics are incorporated
Chapter 22
Chapter 23 Algorithm Efficiency
  • New §§23.9-23.11
  • New exercises 23.1-23.9
Chapter 23 (partial)
Chapter 24 Lists, Stacks, and Queues
  • New §23.7 Case Study: Evaluating Expressions
  • New exercises 23.6-23.10
  • Generics are incorporated in this chapter
Chapter 20 (partial)
Chapter 25 Trees, Iterators, Heaps, and Priority Queues
  • New §25.4 Iterators
  • New exercises 25.10-25.11
  • Generics are incorporated in this chapter
Chapter 20 (partial)
Chapter 26 Sorting
  • New exercises 26.7-26.8
Chapter 23 (partial)
Chapter 27 Graph Applications
  • Brand new
Chapter 28 Weighted Graph Applications
  • Brand new
Chapter 29 Multithreading
  • New §27.18 SwingWorker Listing 27.14 ProgressBarDemo.java is revised using SwingWorker
  • New JDK 1.5 concurrency features are incorporated
  • New exercise 27.13
Chapter 24
Chapter 30 Networking
  • Datagram networking is moved to the Companion Web site
Chapter 25
Chapter 31 Internationalization Chapter 26
Chapter 32 JavaBeans and Bean Events Chapter 27
Chapter 33 Containers, Layout Managers, and Borders
  • Discussions on GridLayout, OverlayLayout, and SpringLayout are moved to the Companion Web site as supplements
  • Discussions on pluggable look and feel are moved to the Companion Web site as supplements
Chapter 28
Chapter 34 Menus, Toolbars, and Dialogs
  • Moved internal frames to the Companion Web site
Chapter 29
Chapter 35 MVC and Swing Models Chapter 30
Chapter 36 JTable and JTree
  • New §34.4 Auto Sort and Filtering
  • New exercise 34.9
Chapter 31
Chapter 37 Java Database Programming
  • New §35.6 CallableStatement
  • New exercise 35.7
Chapter 32
Chapter 38 Advanced Java Database Programming
  • New §34.6 RowSetTableModel
  • New exercises 36.3 and 36.5
Chapter 33
Chapter 39 Servlets Chapter 34
Chapter 40 JavaServer Pages
  • New exercises 38.14 and 38.19
Chapter 35
Chapter 41 JavaServer Faces
  • Brand new
Chapter 42 Web Services
  • Brand new
Chapter 43 Remote Method Invocation
  • Incorporate dynamic generation of stubs and skeletons at runtime
  • New Exercise 43.7
Chapter 36