Java Books

absolute_javaSavitch, Walter (2013) “Absolute Java”, 5th Edition, Pearson Education, Addison-Wesley

Download eBook PDF (PDF  7,067KB)
Download Source Code (ZIP 1,030KB)

For undergraduate students in Computer Science and Computer Programming courses.
Praised for providing an engaging balance of thoughtful examples and explanatory discussion, best-selling author Walter Savitch explains concepts and techniques in a straightforward style using understandable language and code enhanced by a suite of pedagogical tools.
Absolute Java is appropriate for both introductory and intermediate programming courses introducing Java.

Table of Contents

Chapter 1 – Getting Started
Chapter 2 – Console Input and Output
Chapter 3 – Flow of Control
Chapter 4 – Defining Classes I
Chapter 5 – Defining Classes II
Chapter 6 – Arrays
Chapter 7 – Inheritance
Chapter 8 – Polymorphism and Abstract Classes
Chapter 9 – Exception Handling
Chapter 10 – File I/O
Chapter 11 – Recursion
Chapter 12 – UML and Patterns
Chapter 13 – Interfaces and Inner Classes
Chapter 14 – Generics and the ArrayList Class
Chapter 15 – Linked Data Structures
Chapter 16 – Collections, Maps and Iterators
0134041674Chapter 17 – Swing I
Chapter 18 – Swing II
Chapter 19 – Java Never Ends
Chapter 20 – Applets and HTML (Online at http://www.aw.com/savitch)
Appendix 1 – Keywords
Appendix 2 – Precedence and Associativity Rules
Appendix 3 – Unicode Character Set
Appendix 4 – Format Specifications for printf
Appendix 5 – Summary of Classes and Interfaces

NOTE:  There is now a Sixth Edition (2015) of this book   

PowerPoints

Chapter 1 – Getting Started
Chapter 2 – Console Input and Output
Chapter 3 – Flow of Control
Chapter 4 – Defining Classes I
Chapter 5 – Defining Classes II
Chapter 6 – Arrays
Chapter 7 – Inheritance
Chapter 8 – Polymorphism and Abstract Classes
Chapter 9 – Exception Handling
Chapter 10 – File I/O
Chapter 11 – Recursion1
Chapter 12 – UML and Patterns
Chapter 13 – Interfaces and Inner Classes
Chapter 14 – Generics and the ArrayList Class
Chapter 15 – Linked Data Structures
Chapter 16 – Collections, Maps and Iterators
Chapter 17 – Swing I
Chapter 18 – Swing II
Chapter 19 – Java Never Ends
Chapter 20 – Applets and HTML


51ws2QXl8jL__SX367_BO1,204,203,200_Deitel, H. and Deitel, P.  (2012) Java – How To Program, Ninth Edition, Pearson Education

Dpwnload eBook PDF (PDF 24,829KB)

Source Code (ZIP  36,053KB)

Table of Contents

1. Introduction to Computers and Java

1 1 Introduction
1.2 Computers: Hardware and Software
1.3 Data Hierarchy
1.4 Computer Organization
1.5 Machine Languages, Assembly Languages and High-Level Languages
1.6 Introduction to Object Technology
1.7 Operating Systems
1.8 Programming Languages
1.9 Java and a Typical Java Development Environment
1.10 Test-Driving a Java Application
1.11 Web 2.0: Going Social
1.12 Software Technologies
1.13 Keeping Up-to-Date with Information Technologies
1.14 Wrap-Up

2. Introduction to Java Applications

2.1 Introduction
2.2 Your First Program in Java: Printing a Line of Text
2.3 Modifying Your First Java Program
2.4 Displaying Text with printf
2.5 Another Application: Adding Integers
2.6 Memory Concepts
2.7 Arithmetic
2.8 Decision Making: Equality and Relational Operators
2.9 Wrap-Up

3. Introduction to Classes, Objects, Methods and Strings

3.1 Introduction
3.2 Declaring a Class with a Method and Instantiating an Object of a Class
3.3 Declaring a Method with a Parameter
3.4 Instance Variables, set Methods and get Methods
3.5 Primitive Types vs. Reference Types
3.6 Initializing Objects with Constructors
3.7 Floating-Point Numbers and Type double
3.8 (Optional) GUI and Graphics Case Study: Using Dialog Boxes
3.9 Wrap-Up

4. Control Statements: Part 1

4.1 Introduction
4.2 Algorithms
4.3 Pseudocode
4.4 Control Structures
4.5 if Single-Selection Statement
4.6 if…else Double-Selection Statement
4.7 while Repetition Statement
4.8 Formulating Algorithms: Counter-Controlled Repetition
4.9 Formulating Algorithms: Sentinel-Controlled Repetition
4.10 Formulating Algorithms: Nested Control Statements
4.11 Compound Assignment Operators
4.12 Increment and Decrement Operators
4.13 Primitive Types
4.14 (Optional) GUI and Graphics Case Study: Creating Simple Drawings
4.15 Wrap-Up

5. Control Statements: Part 2

5.1 Introduction
5.2 Essentials of Counter-Controlled Repetition
5.3 for Repetition Statement
5.4 Examples Using the for Statement
5.5 do…while Repetition Statement
5.6 switch Multiple-Selection Statement
5.7 break and continue Statements
5.8 Logical Operators
5.9 Structured Programming Summary
5.10 (Optional) GUI and Graphics Case Study: Drawing Rectangles and Ovals
5.11 Wrap-Up

6. Methods: A Deeper Look

6.1 Introduction
6.2 Program Modules in Java
6.3 static Methods, static Fields and Class Math
6.4 Declaring Methods with Multiple Parameters
6.5 Notes on Declaring and Using Methods
6.6 Method-Call Stack and Activation Records
6.7 Argument Promotion and Casting
6.8 Java API Packages
6.9 Case Study: Random-Number Generation
6.9.1 Generalized Scaling and Shifting of Random Numbers
6.9.2 Random-Number Repeatability for Testing and Debugging
6.10 Case Study: A Game of Chance; Introducing Enumerations
6.11 Scope of Declarations
6.12 Method Overloading
6.13 (Optional) GUI and Graphics Case Study: Colors and Filled Shapes
6.14 Wrap-Up

7. Arrays and ArrayLists

7.1 Introduction
7.2 Arrays
7.3 Declaring and Creating Arrays
7.4 Examples Using Arrays
7.5 Case Study: Card Shuffling and Dealing Simulation
7.6 Enhanced for Statement
7.7 Passing Arrays to Methods
7.8 Case Study: Class GradeBook Using an Array to Store Grades
7.9 Multidimensional Arrays
7.10 Case Study: Class GradeBook Using a Two-Dimensional Array
7.11 Variable-Length Argument Lists
7.12 Using Command-Line Arguments
7.13 Class Arrays
7.14 Introduction to Collections and Class ArrayList
7.15 (Optional) GUI and Graphics Case Study: Drawing Arcs
7.16 Wrap-Up

8. Classes and Objects: A Deeper Look 

8.1 Introduction
8.2 Time Class Case Study
8.3 Controlling Access to Members
8.4 Referring to the Current Object’s Members with the this Reference
8.5 Time Class Case Study: Overloaded Constructors
8.6 Default and No-Argument Constructors
8.7 Notes on Set and Get Methods
8.8 Composition
8.9 Enumerations
8.10 Garbage Collection and Method finalize
8.11 static Class Members
8.12 static Import
8.13 final Instance Variables
8.14 Time Class Case Study: Creating Packages
8.15 Package Access
8.16 (Optional) GUI and Graphics Case Study: Using Objects with Graphics
8.17 Wrap-Up

9. Object-Oriented Programming: Inheritance

9.1 Introduction
9.2 Superclasses and Subclasses
9.3 protected Members
9.4 Relationship between Superclasses and Subclasses
9.4.1 Creating and Using a CommissionEmployee Class
9.4.2 Creating and Using a BasePlusCommissionEmployee Class
9.4.3 Creating a CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy
9.4.4 CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using protected Instance Variables
9.4.5 CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using private Instance Variables
9.5 Constructors in Subclasses
9.6 Software Engineering with Inheritance
9.7 Class Object
9.8 (Optional) GUI and Graphics Case Study: Displaying Text and Images Using Labels
9.9 Wrap-Up

10. Object-Oriented Programming: Polymorphism

10.1 Introduction
10.2 Polymorphism Examples
10.3 Demonstrating Polymorphic Behavior
10.4 Abstract Classes and Methods
10.5 Case Study: Payroll System Using Polymorphism
10.5.1 Abstract Superclass Employee
10.5.2 Concrete Subclass SalariedEmployee
10.5.3 Concrete Subclass HourlyEmployee
10.5.4 Concrete Subclass CommissionEmployee
10.5.5 Indirect Concrete Subclass BasePlusCommissionEmployee
10.5.6 Polymorphic Processing, Operator instanceof and Downcasting
10.5.7 Summary of the Allowed Assignments Between Superclass and Subclass Variables
10.6 final Methods and Classes
10.7 Case Study: Creating and Using Interfaces
10.7.1 Developing a Payable Hierarchy
10.7.2 Interface Payable
10.7.3 Class Invoice
10.7.4 Modifying Class Employee to Implement Interface Payable
10.7.5 Modifying Class SalariedEmployee for Use in the Payable Hierarchy
10.7.6 Using Interface Payable to Process Invoices and Employees Polymorphically
10.7.7 Common Interfaces of the Java API
10.8 (Optional) GUI and Graphics Case Study: Drawing with Polymorphism
10.9 Wrap-Up

11. Exception Handling: A Deeper Look 

11.1 Introduction
11.2 Example: Divide by Zero without Exception Handling
11.3 Example: Handling ArithmeticExceptions and InputMismatchExceptions
11.4 When to Use Exception Handling
11.5 Java Exception Hierarchy
11.6 finally Block
11.7 Stack Unwinding and Obtaining Information from an Exception Object
11.8 Chained Exceptions
11.9 Declaring New Exception Types
11.10 Preconditions and Postconditions 460
11.11 Assertions
11.12 (New in Java SE 7) Multi-catch: Handling Multiple Exceptions in One catch
11.13 (New in Java SE 7) try-with-Resources: Automatic Resource Deallocation
11.14 Wrap-Up

12. ATM Case Study, Part 1: Object-Oriented Design with the UML

12.1 Case Study Introduction
12.2 Examining the Requirements Document
12.3 Identifying the Classes in a Requirements Document
12.4 Identifying Class Attributes
12.5 Identifying Objects’ States and Activities
12.6 Identifying Class Operations
12.7 Indicating Collaboration Among Objects
12.8 Wrap-Up

12. ATM Case Study Part 2: Implementing an Object-Oriented Design

13.1 Introduction
13.2 Starting to Program the Classes of the ATM System
13.3 Incorporating Inheritance and Polymorphism into the ATM System
13.4 ATM Case Study Implementation
13.4.1 Class ATM
13.4.2 Class Screen
13.4.3 Class Keypad
13.4.4 Class CashDispenser
13.4.5 Class DepositSlot
13.4.6 Class Account
13.4.7 Class BankDatabase
13.4.8 Class Transaction
13.4.9 Class BalanceInquiry
13.4.10 Class Withdrawal
13.4.11 Class Deposit
13.4.12 Class ATMCaseStudy
13.5 Wrap-Up

14. GUI Components: Part 1

14.1 Introduction
14.2 Java’s New Nimbus Look-and-Feel
14.3 Simple GUI-Based Input/Output with JOptionPane
14.4 Overview of Swing Components
14.5 Displaying Text and Images in a Window
14.6 Text Fields and an Introduction to Event Handling with Nested Classes
14.7 Common GUI Event Types and Listener Interfaces
14.8 How Event Handling Works
14.9 JButton
14.10 Buttons That Maintain State
14.10.1 JCheckBox
14.10.2 JRadioButton
14.11 JComboBox; Using an Anonymous Inner Class for Event Handling
14.12 JList
14.13 Multiple-Selection Lists
14.14 Mouse Event Handling
14.15 Adaptor Classes
14.16 JPanel Subclass for Drawing with the Mouse
14.17 Key Event Handling
14.18 Introduction to Layout Managers
14.18.1 FlowLayout
14.18.2 BorderLayout
14.18.3 GridLayout
14.19 Using Panels to Manage More Complex Layouts
14.20 JTextArea
14.21 Wrap-Up

15. Graphics and Java 2D

15.1 Introduction
15.2 Graphics Contexts and Graphics Objects
15.3 Color Control
15.4 Manipulating Fonts
15.5 Drawing Lines, Rectangles and Ovals
15.6 Drawing Arcs
15.7 Drawing Polygons and Polylines
15.8 Java 2D API
15.9 Wrap-Up

16. Strings, Characters and Regular Expressions

16.1 Introduction
16.2 Fundamentals of Characters and Strings
16.3 Class String
16.3.1 String Constructors
16.3.2 String Methods length, charAt and getChars
16.3.3 Comparing Strings
16.3.4 Locating Characters and Substrings in Strings
16.3.5 Extracting Substrings from Strings
16.3.6 Concatenating Strings
16.3.7 Miscellaneous String Methods
16.3.8 String Method valueOf
16.4 Class StringBuilder
16.4.1 StringBuilder Constructors
16.4.2 StringBuilder Methods length, capacity, setLength and ensureCapacity
16.4.3 StringBuilder Methods charAt, setCharAt, getChars and reverse
16.4.4 StringBuilder append Methods
16.4.5 StringBuilder Insertion and Deletion Methods
16.5 Class Character
16.6 Tokenizing Strings
16.7 Regular Expressions, Class Pattern and Class Matcher
16.8 Wrap-Up

17. Files, Streams and Object Serialization

17.1 Introduction
17.2 Files and Streams
17.3 Class File
17.4 Sequential-Access Text Files
17.4.1 Creating a Sequential-Access Text File
17.4.2 Reading Data from a Sequential-Access Text File
17.4.3 Case Study: A Credit-Inquiry Program
17.4.4 Updating Sequential-Access Files
17.5 Object Serialization
17.5.1 Creating a Sequential-Access File Using Object Serialization
17.5.2 Reading and Deserializing Data from a Sequential-Access File
17.6 Additional java.io Classes
17.6.1 Interfaces and Classes for Byte-Based Input and Output
17.6.2 Interfaces and Classes for Character-Based Input and Output
17.7 Opening Files with JFileChooser
17.8 Wrap-Up

18. Recursion

18.1 Introduction
18.2 Recursion Concepts
18.3 Example Using Recursion: Factorials
18.4 Example Using Recursion: Fibonacci Series
18.5 Recursion and the Method-Call Stack
18.6 Recursion vs. Iteration
18.7 Towers of Hanoi
18.8 Fractals
18.9 Recursive Backtracking
18.10 Wrap-Up

19. Searching, Sorting and Big O

19.1 Introduction
19.2 Searching Algorithms
19.2.1 Linear Search
19.2.2 Binary Search
19.3 Sorting Algorithms
19.3.1 Selection Sort
19.3.2 Insertion Sort
19.3.3 Merge Sort
19.4 Wrap-Up

20. Generic Collections

20.1 Introduction
20.2 Collections Overview
20.3 Type-Wrapper Classes for Primitive Types
20.4 Autoboxing and Auto-Unboxing
20.5 Interface Collection and Class Collections
20.6 Lists
20.6.1 ArrayList and Iterator
20.6.2 LinkedList
20.7 Collections Methods
20.7.1 Method sort
20.7.2 Method shuffle
20.7.3 Methods reverse, fill, copy, max and min
20.7.4 Method binarySearch
20.7.5 Methods addAll, frequency and disjoint
20.8 Stack Class of Package java.util
20.9 Class PriorityQueue and Interface Queue
20.10 Sets
20.11 Maps
20.12 Properties Class
20.13 Synchronized Collections
20.14 Unmodifiable Collections
20.15 Abstract Implementations
20.16 Wrap-Up

21. Generic Classes and Methods

21.1 Introduction
21.2 Motivation for Generic Methods
21.3 Generic Methods: Implementation and Compile-Time Translation
21.4 Additional Compile-Time Translation Issues: Methods That Use a Type Parameter as the Return Type
21.5 Overloading Generic Methods
21.6 Generic Classes
21.7 Raw Types
21.8 Wildcards in Methods That Accept Type Parameters
21.9 Generics and Inheritance: Notes
21.10 Wrap-Up

22. Custom Generic Data Structures

22.1 Introduction
22.2 Self-Referential Classes
22.3 Dynamic Memory Allocation
22.4 Linked Lists
22.5 Stacks
22.6 Queues
22.7 Trees
22.8 Wrap-Up

23. Applets and Java Web Start

23.1 Introduction
23.2 Sample Applets Provided with the JDK
23.3 Simple Java Applet: Drawing a String
23.3.1 Executing WelcomeApplet in the appletviewer
23.3.2 Executing an Applet in a Web Browser
23.4 Applet Life-Cycle Methods
23.5 Initialization with Method init
23.6 Sandbox Security Model
23.7 Java Web Start and the Java Network Launch Protocol (JNLP)
23.7.1 Packaging the DrawTest Applet for Use with Java Web Start
23.7.2 JNLP Document for the DrawTest Applet
23.8 Wrap-Up

24. Multimedia: Applets and Applications

24.1 Introduction
24.2 Loading, Displaying and Scaling Images
24.3 Animating a Series of Images 975
24.4 Image Maps
24.5 Loading and Playing Audio Clips
24.6 Playing Video and Other Media with Java Media Framework
24.7 Wrap-Up
24.8 Web Resources

25. GUI Components: Part 2

25.1 Introduction
25.2 JSlider
25.3 Windows: Additional Notes
25.4 Using Menus with Frames
25.5 JPopupMenu
25.6 Pluggable Look-and-Feel
25.7 JDesktopPane and JInternalFrame
25.8 JTabbedPane
25.9 Layout Managers: BoxLayout and GridBagLayout
25.10 Wrap-Up

26. Multithreading

26.1 Introduction
26.2 Thread States: Life Cycle of a Thread
26.3 Creating and Executing Threads with Executor Framework
26.4 Thread Synchronization
26.4.1 Unsynchronized Data Sharing
26.4.2 Synchronized Data Sharing–Making Operations Atomic
26.5 Producer/Consumer Relationship without Synchronization
26.6 Producer/Consumer Relationship: ArrayBlockingQueue
26.7 Producer/Consumer Relationship with Synchronization
26.8 Producer/Consumer Relationship: Bounded Buffers
26.9 Producer/Consumer Relationship: The Lock and Condition Interfaces
26.10 Concurrent Collections Overview
26.11 Multithreading with GUI
26.11.1 Performing Computations in a Worker Thread
26.11.2 Processing Intermediate Results with SwingWorker
26.12 Interfaces Callable and Future
26.13 Java SE 7: Fork/Join Framework
26.14 Wrap-Up

27. Networking

27.1 Introduction
27.2 Manipulating URLs
27.3 Reading a File on a Web Server
27.4 Establishing a Simple Server Using Stream Sockets
27.5 Establishing a Simple Client Using Stream Sockets
27.6 Client/Server Interaction with Stream Socket Connections
27.7 Datagrams: Connectionless Client/Server Interaction
27.8 Client/Server Tic-Tac-Toe Using a Multithreaded Server
27.9 [Web Bonus] Case Study: DeitelMessenger
27.10 Wrap-Up

28. Accessing Databases with JDBC

28.1 Introduction
28.2 Relational Databases
28.3 Relational Database Overview: The books Database
28.4 SQL
28.4.1 Basic SELECT Query
28.4.2 WHERE Clause
28.4.3 ORDER BY Clause
28.4.4 Merging Data from Multiple Tables: INNER JOIN
28.4.5 INSERT Statement
28.4.6 UPDATE Statement
28.4.7 DELETE Statement
28.5 Instructions for Installing MySQL and MySQL Connector/J
28.6 Instructions for Setting Up a MySQL User Account
28.7 Creating Database books in MySQL
28.8 Manipulating Databases with JDBC
28.8.1 Connecting to and Querying a Database
28.8.2 Querying the books Database
28.9 RowSet Interface
28.10 Java DB/Apache Derby
28.11 PreparedStatements
28.12 Stored Procedures
28.13 Transaction Processing
28.14 Wrap-Up
28.15 Web Resources

29. JavaServer™ Faces Web Apps: Part 1

29.1 Introduction
29.2 HyperText Transfer Protocol (HTTP) Transactions
29.3 Multitier Application Architecture
29.4 Your First JSF Web App
29.4.1 The Default index.xhtml Document: Introducing Facelets
29.4.2 Examining the WebTimeBean Class
29.4.3 Building the WebTime JSF Web App in NetBeans
29.5 Model-View-Controller Architecture of JSF Apps
29.6 Common JSF Components
29.7 Validation Using JSF Standard Validators
29.8 Session Tracking
29.8.1 Cookies
29.8.2 Session Tracking with @SessionScoped Beans
29.9 Wrap-Up

30. JavaServer™ Faces Web Apps: Part 2

30.1 Introduction
30.2 Accessing Databases in Web Apps
30.2.1 Setting Up the Database
30.2.2 @ManagedBean Class AddressBean
30.2.3 index.xhtml Facelets Page
30.2.4 addentry.xhtml Facelets Page
30.3 Ajax
30.4 Adding Ajax Functionality to the Validation App
30.5 Wrap-Up

31. Web Services

31.1 Introduction
31.2 Web Service Basics
31.3 Simple Object Access Protocol (SOAP)
31.4 Representational State Transfer (REST)
31.5 JavaScript Object Notation (JSON)
31.6 Publishing and Consuming SOAP-Based Web Services
31.6.1 Creating a Web Application Project and Adding a Web Service Class in NetBeans
31.6.2 Defining the WelcomeSOAP Web Service in NetBeans
31.6.3 Publishing the WelcomeSOAP Web Service from NetBeans
31.6.4 Testing the WelcomeSOAP Web Service with GlassFish Application Server’s Tester Web Page 1308
31.6.5 Describing a Web Service with the Web Service Description Language (WSDL) 1309
31.6.6 Creating a Client to Consume the WelcomeSOAP Web Service
31.6.7 Consuming the WelcomeSOAP Web Service
31.7 Publishing and Consuming REST-Based XML Web Services
31.7.1 Creating a REST-Based XML Web Service
31.7.2 Consuming a REST-Based XML Web Service
31.8 Publishing and Consuming REST-Based JSON Web Services
31.8.1 Creating a REST-Based JSON Web Service
31.8.2 Consuming a REST-Based JSON Web Service
31.9 Session Tracking in a SOAP Web Service
31.9.1 Creating a Blackjack Web Service
31.9.2 Consuming the Blackjack Web Service
31.10 Consuming a Database-Driven SOAP Web Service
31.10.1 Creating the Reservation Database
31.10.2 Creating a Web Application to Interact with the Reservation Service
31.11 Equation Generator: Returning User-Defined Types
31.11.1 Creating the EquationGeneratorXML Web Service
31.11.2 Consuming the EquationGeneratorXML Web Service
31.11.3 Creating the EquationGeneratorJSON Web Service
31.11.4 Consuming the EquationGeneratorJSON Web Service
31.12 Wrap-Up

Appendices

A Operator Precedence Chart

B ASCII Character Set

C Keywords and Reserved Words

D Primitive Types

E Using the Java API Documentation
E.1 Introduction 1370
E.2 Navigating the Java API

F Using the Debugger 
F.1 Introduction
F.2 Breakpoints and the run, stop, cont and print Commands
F.3 The print and set Commands
F.4 Controlling Execution Using the step, step up and next Commands
F.5 The watch Command
F.6 The clear Command
F.7 Wrap-Up

G Formatted Output
G.1 Introduction
G.2 Streams
G.3 Formatting Output with printf
G.4 Printing Integers
G.5 Printing Floating-Point Numbers
G.6 Printing Strings and Characters
G.7 Printing Dates and Times
G.8 Other Conversion Characters
G.9 Printing with Field Widths and Precisions
G.10 Using Flags in the printf Format String
G.11 Printing with Argument Indices
G.12 Printing Literals and Escape Sequences
G.13 Formatting Output with Class Formatter
G.14 Wrap-Up

H Number Systems
H.1 Introduction
H.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
H.3 Converting Octal and Hexadecimal Numbers to Binary Numbers
H.4 Converting from Binary, Octal or Hexadecimal to Decimal
H.5 Converting from Decimal to Binary, Octal or Hexadecimal

I GroupLayout
I.1 Introduction
I.2 GroupLayout Basics
I.3 Building a ColorChooser
I.4 GroupLayout Web Resources

J Java Desktop Integration Components
J.1 Introduction
J.2 Splash Screens
J.3 Desktop Class
J.4 Tray Icons

K Mashups
K.1 Introduction
K.2 Popular Mashups
K.3 APIs Commonly Used in Mashups
K.4 Deitel Mashups Resource Center
K.5 Deitel RSS Resource Center
K.6 Mashup Performance and Reliability Issues

L Unicode®
L.1 Introduction
L.2 Unicode Transformation Formats
L.3 Characters and Glyphs
L.4 Advantages/Disadvantages of Unicode
L.5 Using Unicode
L.6 Character Ranges

Appendices on the Web

Appendices M—Q are PDF documents posted online at the book’s Companion Website (http://www.pearsonhighered.com/deitel/).

M Creating Documentation with javadoc
M.1 Introduction
M.2 Documentation Comments
M.3 Documenting Java Source Code
M.4 javadoc
M.5 Files Produced by javadoc

N Bit Manipulation
N.1 Introduction
N.2 Bit Manipulation and the Bitwise Operators
N.3 BitSet Class

O Labeled break and continue Statements
O.1 Introduction
O.2 Labeled break Statement
O.3 Labeled continue Statement

P UML 2: Additional Diagram Types
P.1 Introduction
P.2 Additional Diagram Types

Q Design Patterns
Q.1 Introduction
Q.2 Creational, Structural and Behavioral Design Patterns
Q.2.1 Creational Design Patterns
Q.2.2 Structural Design Patterns
Q.2.3 Behavioral Design Patterns
Q.2.4 Conclusion
Q.3 Design Patterns in Packages java.awt and javax.swing
Q.3.1 Creational Design Patterns
Q.3.2 Structural Design Patterns
Q.3.3 Behavioral Design Patterns
Q.3.4 Conclusion
Q.4 Concurrency Design Patterns
Q.5 Design Patterns Used in Packages java.io and java.net
Q.5.1 Creational Design Patterns
Q.5.2 Structural Design Patterns
Q.5.3 Architectural Patterns
Q.5.4 Conclusion
Q.6 Design Patterns Used in Package java.util
Q.6.1 Creational Design Patterns
Q.6.2 Behavioral Design Patterns
Q.7 Wrap-Up


Liang, Y. Daniel (2012) Introduction to Java Programming – Comprehensive Version, International Edition, Ninth Edition, Pearson Education

A newer version of this book is available – Tenth Edition (See below)

Download All Code Examples (ZIP 148,127 KB)
Download Code Examples by Chapter  (ZIP 3,589KB)

Daniel Liang teaches concepts of problem-solving and object-oriented programming using a fundamentals-first approach. Beginning programmers learn critical problem-solving techniques then move on to grasp the key concepts of object-oriented, GUI programming, advanced GUI and Web programming using Java. For a 1-, 2-, or 3-semester CS1 course sequence.

Table of Contents

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 2 Elementary Programming

Chapter 3 Selections

Chapter 4 Loops

Chapter 5 Methods

Chapter 6 Single-Dimensional Arrays

Chapter 7 Multidimensional Arrays

Chapter 8 Objects and Classes

Chapter 9 Strings

Chapter 10 Thinking in Objects

Chapter 11 Inheritance and Polymorphism

Chapter 12 GUI Basics

Chapter 13 Graphics

Chapter 14 Exception Handling and Text I/O

Chapter 15 Abstract Classes and Interfaces

Chapter 16 Event-Driven Programming

Chapter 17 GUI Components

Chapter 18 Applets and Multimedia

Chapter 19 Binary I/O

Chapter 20 Recursion

Chapter 21 Generics

Chapter 22 Lists, Stacks, Queues, and Priority Queues

Chapter 23 Sets and Maps

Chapter 24 Developing Efficient Algorithms

Chapter 25 Sorting

Chapter 26 Implementing Lists, Stacks, and Queues, and Priority Queues

Chapter 27 Binary Search Trees

Chapter 28 Hashing

Chapter 29 AVL Trees

Chapter 30 Graphs and Applications

Chapter 31 Weighted Graphs and Applications

Chapter 32 Multithreading and Parallel Programming

Chapter 33 Networking

Chapter 34 Java Database Programming

Bonus Chapters 35—49 are available on the Companion Website

Chapter 35 Internationalization (Download Word 900KB)

Chapter 36 JavaBeans and Bean Events (Download Word 538KB)

Chapter 37 Containers, Layout Managers, and Borders (Download Word 1.056KB)

Chapter 38 Menus, Toolbars, and Dialogs (Download Word 3,200KB)

Chapter 39 MVC and Swing Models (Download Word 1,345KB)

Chapter 40 JTable and JTree (Download Word 1,408KB)

Chapter 41 Advanced Database Programming (Download Word 595KB)

Chapter 42 Servlets (Download Word 4,064KB)

Chapter 43 JavaServer Pages (Download Word 1,498KB)

Chapter 44 JavaServer Faces (Download Word 3,014KB)

Chapter 45 Web Services (Download Word 1,139KB)

Chapter 46 Remote Method Invocation (Download Word 1,588KB)

Chapter 47 2-4 Trees and B-Trees (Download Word 2,444KB)

Chapter 48 Red-Black Trees (Download Word 2,444KB)

Chapter 49 Java 2D (Download Word 1,234KB)

Chapter 50 Testing Using JUnit (Download Word 1,198KB)

Appendixes

Appendix A   Java Keywords

Appendix B   The ASCII Character Set

Appendix C   Operator Precedence Chart

Appendix D   Java Modifiers

Appendix E   Special Floating-Point Values

Appendix F   Number Systems

Appendix G   Bitwise Operations

PowerPoints

Chapter 1 Introduction to Computers, Programs, and Java (PPT 634KB)

Chapter 2 Elementary Programming (PPT 592KB)

Chapter 3 Selections (PPT KB)

Chapter 4 Loops (PPT KB)

Chapter 5 Methods (PPT KB)

Chapter 6 Single-Dimensional Arrays (PPT KB)

Chapter 7 Multidimensional Arrays (PPT KB)

Chapter 8 Objects and Classes (PPT KB)

Chapter 9 Strings (PPT KB)

Chapter 10 Thinking in Objects (PPT KB)

Chapter 11 Inheritance and Polymorphism (PPT KB)

Chapter 12 GUI Basics (PPT KB)

Chapter 13 Graphics (PPT KB)

Chapter 14 Exception Handling and Text I/O (PPT KB)

Chapter 15 Abstract Classes and Interfaces (PPT KB)

Chapter 16 Event-Driven Programming (PPT KB)

Chapter 17 GUI Components (PPT KB)

Chapter 18 Applets and Multimedia (PPT KB)

Chapter 19 Binary I/O (PPT KB)

Chapter 20 Recursion (PPT KB)

Chapter 21 Generics (PPT KB)

Chapter 22 Lists, Stacks, Queues, and Priority Queues (PPT KB)

Chapter 23 Sets and Maps (PPT KB)

Chapter 24 Developing Efficient Algorithms (PPT KB)

Chapter 25 Sorting (PPT KB)

Chapter 26 Implementing Lists, Stacks, and Queues, and Priority Queues (PPT KB)

Chapter 27 Binary Search Trees (PPT KB)

Chapter 28 Hashing (PPT KB)

Chapter 29 AVL Trees (PPT KB)

Chapter 30 Graphs and Applications (PPT KB)

Chapter 31 Weighted Graphs and Applications (PPT KB)

Chapter 32 Multithreading and Parallel Programming (PPT KB)

Chapter 33 Networking (PPT KB)

Chapter 34 Java Database Programming (PPT KB)

Chapter 35 Internationalization (PPT KB)

Chapter 36 JavaBeans and Bean Events (PPT KB)

Chapter 37 Containers, Layout Managers, and Borders (PPT KB)

Chapter 38 Menus, Toolbars, and Dialogs (PPT KB)

Chapter 39 MVC and Swing Models (PPT KB)

Chapter 40 JTable and JTrees (PPT KB)

Chapter 41 Advanced Database Programming (PPT KB)

Chapter 42 Servlets (PPT KB)

Chapter 43 JavaServer Pages(PPT KB)

Chapter 44 JavaServer Faces (PPT KB)

Chapter 45 Web Services (PPT KB)

Chapter 46 Remote Method Invocation (PPT KB)

Chapter 47 2-4 Trees and B-Trees (PPT KB)

Chapter 48 Red-Black Trees (PPT KB)

Chapter 49 Java 2D (PPT KB)

Chapter 50 Testing Using JUnit (PPT KB)

Appendix F Number Systems (PPT KB)

GUI Example Demo (PPT KB)


Liang, Y. Daniel (2013) Introduction to Java Programming – Comprehensive Version, Tenth Edition, Pearson Education

Download eBook PDF (PDF 14,321KB)

Download ALL Code Examples (ZIP 28,842KB)

Download All Code Examples by Chapter  (ZIP 2,602KB)

Download individual samples by chapter from https://media.pearsoncmg.com/ph/esm/ecs_liang_ijp_10/ExampleByChapters.html

This text is intended for a 1-, 2-, or 3-semester CS1 course sequence. Comprehensive coverage of Java and programming make this a useful reference for beginning programmers and IT professionals.

Daniel Liang teaches concepts of problem-solving and object-oriented programming using a fundamentals-first approach. Beginning programmers learn critical problem-solving techniques then move on to grasp the key concepts of object-oriented, GUI programming, advanced GUI and Web programming using Java. Liang approaches Java GUI programming using JavaFX, not only because JavaFX is much simpler for new Java programmers to learn and use but because it has replaced Swing as the new GUI tool for developing cross-platform-rich Internet applications on desktop computers, on hand-held devices, and on the Web. Additionally, for instructors, JavaFXprovides a better teaching tool for demonstrating object-oriented programming.

Teaching and Learning Experience
To provide a better teaching and learning experience, for both instructors and students, this program offers:

  • Fundamentals-First Approach: Basic programming concepts are introduced on control statements, loops, functions, and arrays before object-oriented programming is discussed.
  • Problem-Driven Motivation: The examples and exercises throughout the book emphasize problem solving and foster the concept of developing reusable components and using them to create practical projects.
  • A Superior Pedagogical Design that Fosters Student Interest: Key concepts are reinforced with objectives lists, introduction and chapter overviews, easy-to-follow examples, chapter summaries, review questions, programming exercises, and interactive self-tests.
  • The Most Extensive Instructor and Student Support Package Available: The author maintains a website at www.pearsonhighered.com/liang that includes multiple interactive resources.

Table of Contents

Chapter 1 Introduction to Computers, Programs, and Java
Chapter 2 Elementary Programming
Chapter 3 Selections
Chapter 4 Mathematical Functions, Characters, and Strings
Chapter 5 Loops
Chapter 6 Methods
Chapter 7 Single-Dimensional Arrays
Chapter 8 Multidimensional Arrays
Chapter 9 Objects and Classes
Chapter 10 Object-Oriented Thinking
Chapter 11 Inheritance and Polymorphism
Chapter 12 Exception Handling and Text I/O
Chapter 13 Abstract Classes and Interfaces
Chapter 14 JavaFX Basics
Chapter 15 Event-Driven Programming and Animations
Chapter 16 JavaFX UI Controls and Multimedia
Chapter 17 BinaryI/O
Chapter 18 Recursion
Chapter 19 Generics
Chapter 20 Lists, Stacks, Queues, and Priority Queues
Chapter 21 Sets and Maps
Chapter 22 Developing Efficient Algorithms
Chapter 23 Sorting
Chapter 24 Implementing Lists, Stacks, Queues, and Priority Queues
Chapter 25 Binary Search Trees
Chapter 26 AVL Trees
Chapter 27 Hashing
Chapter 28 Graphs and Applications
Chapter 29 Weighted Graphs and Applications
Chapter 30 Multithreading and Parallel Programming
Chapter 31 Networking
Chapter 32 Java Database Programming
Chapter 33 JavaServer Faces

Appendixes
Appendix A Java Keywords
Appendix B The ASCII Character Set
Appendix C Operator Precedence Chart
Appendix D Java Modifiers
Appendix E Special Floating-Point Values
Appendix F Number Systems
Appendix G Bitwise Operations
Appendix H Regular Expressions
Appendix I Enumerated Types

Bonus Chapters 34–42 are available for the Comprehensive Version from the companion Website at www.pearsonhighered.com/liang:

Chapter 34 Advanced JavaFX
Chapter 35 Advanced Database Programming
Chapter 36 Internationalization
Chapter 37 Servlets
Chapter 38 JavaServer Pages
Chapter 39 Web Services
Chapter 40 2-4 Trees and B-Trees
Chapter 41 Red-Black Trees
Chapter 42 Testing Using JUnit


Schildt, H. (2012) Java – A Beginner’s Guide – Create, Compile, and Run Java Programs Today, Fifth Edition, McGraw-Hill Osborne, Oracle Press

A newer version of this book is available

Download Source Code (ZIP 73KB) (Sixth Edition)

Essential Skills–Made Easy!

Learn the fundamentals of Java programming in no time from bestselling programming author Herb Schildt. Fully updated to cover Java Platform, Standard Edition 7 (Java SE 7), Java: A Beginner’s Guide, Fifth Edition starts with the basics, such as how to compile and run a Java program, and then discusses the keywords, syntax, and constructs that form the core of the Java language. You’ll also find coverage of some of Java’s most advanced features, including multithreaded programming and generics. An introduction to Swing concludes the book. Get started programming in Java right away with help from this fast-paced tutorial.

Designed for Easy Learning:

  • Key Skills & Concepts–Chapter-opening lists of specific skills covered in the chapter
  • Ask the Expert–Q&A sections filled with bonus information and helpful tips
  • Try This–Hands-on exercises that show you how to apply your skills
  • Self Tests–End-of-chapter questions that test your understanding
  • Annotated Syntax–Example code with commentary that describes the programming techniques being illustrated

Herb Schildt is the world’s leading programming author, whose books have sold more than 3.5 million copies worldwide. His acclaimed books include Java: The Complete Reference, C++: The Complete Reference and C#: The Complete Reference.

Note for Sixth Edition:

Fully updated for Java Platform, Standard Edition 8 (Java SE 8), Java: A Beginner’s Guide, Sixth Edition gets you started programming in Java right away. Bestselling programming author Herb Schildt begins with the basics, such as how to create, compile, and run a Java program. He then moves on to the keywords, syntax, and constructs that form the core of the Java language. This Oracle Press resource also covers some of Java’s more advanced features, including multithreaded programming, generics, and Swing. Of course, new Java SE 8 features such as lambda expressions and default interface methods are described. An introduction to JavaFX, Java’s newest GUI, concludes this step-by-step tutorial.

Table of Contents

Introduction
Chapter 1. Java Fundamentals
Chapter 2. Introducing Data Types and Operators
Chapter 3. Program Control Statements
Chapter 4. Introducing Classes, Objects, and Methods
Chapter 5. More Data Types and Operators
Chapter 6. A Closer Look at Methods and Classes
Chapter 7. Inheritance
Chapter 8. Packages and Interfaces
Chapter 9. Exception Handling
Chapter 10. Using I/O
Chapter 11. Multithreaded Programming
Chapter 12. Enumerations, Autoboxing, Static Import, and Annotations
Chapter 13. Generics
Chapter 14. Applets, Events, and Miscellaneous Topics
Chapter 15. Introducing Swing
Appendix A. Answers to Self Tests
Appendix B. Using Java’s Documentation Comments

Table of Contents (for Sixth Edition)

Ch. 1: Java Fundamentals
Ch. 2: Introducing Data Types and Operators
Ch. 3: Program Control Statements
Ch. 4: Introducing Classes, Objects, and Methods
Ch. 5: More Data Types and Operators
Ch. 6: A Closer Look at Methods, Classes, and Lambda Expressions
Ch. 7: Inheritance
Ch. 8: Packages and Interfaces
Ch. 9: Exception Hnadling
Ch. 10: Using I/O
Ch. 11: Multithreaded Programing
Ch. 12: Enumerations, Autoboxing, Static Import, and Annotations
Ch. 13: Generics
Ch. 14: Lambda Expressions and Method References
Ch. 15: Applets, Events, and Miscellaneous Topics
Ch. 16: Introducing Swing
Ch. 17: Introducing JavaFX
App A: Answers to Self Tests
App B: Using Java’s Documentation Comment


51QjXtYYxxL__SX400_BO1,204,203,200_Horstmann, C. (2013) Java For Everyone – Late Objects, Second Edition, John Wiley and Sons

Horstmann, C. (2013) Java for Everyone – Late Objects, Second Edition, John Wiley and Sons (PDF 17,381KB)

Java For Everyone, 2nd Edition is a comprehensive introduction to Java and computer programming, which focuses on the principles of programming, software engineering, and effective learning.  Active in both the classroom and the software industry, Horstmann knows that meticulous coding–not shortcuts–is the base upon which great programmers are made. Using an innovative visual design that leads students step–by–step through intricacies of Java programming, Java For Everyone, 2nd Edition instills confidence in beginning programmers and confidence leads to success.

Student Companion Site for Worked Examples, Web Chapters, Source Code, Video Examples, Video Examples Code and Errata: http://bcs.wiley.com/he-bcs/Books?action=index&bcsId=6907&itemId=1118063317

Download Java Language Coding Guidelines (PDF 67KB)

Table of Contents

Chapter 1 Introduction
1.1    Computer Programs
1.2    The Anatomy of a Computer
1.3    The Java Programming Language
1.4    Becoming Familiar with Your Programming Environment
1.5    Analyzing Your First Program
1.6    Errors
1.7    Problem Solving: Algorithm Design

Chapter 2 Fundamental Data Types

2.1    Variables
2.2    Arithmetic
2.3    Input and Output
2.4    Problem Solving: First Do it By Hand
2.6    Strings

Chapter 3 Decisions

3.1    The if Statement
3.2    Comparing Numbers and Strings
3.3    Multiple Alternatives
3.4    Nested Branches
3.5    Problem Solving: Flowcharts
3.6    Problem Solving: Test Cases
3.7    Boolean Variables and Operators
3.8    Application: Input Validation

Chapter 4 Loops

4.1    The while Loop
4.2    Problem Solving: Hand-Tracing
4.3    The for Loop
4.4    The do Loop
4.5    Application: Processing Sentinel Values
4.6    Problem Solving: Storyboards
4.7    Common Loop Algorithms
4.8    Nested Loops
4.9    Application: Random Numbers and Simulations

Chapter 5 Methods

5.1    Methods as Black Boxes
5.2    Implementing Methods
5.3    Parameter Passing
5.4    Return Values
5.5    Methods Without Return Values
5.6    Problem Solving: Reusable Functions
5.7    Problem Solving: Stepwise Refinement
5.8    Variable Scope
5.9    Recursive Methods (Optional)

Chapter 6 Arrays and Array Lists

6.1    Arrays
6.2    The Enhanced for Loop
6.3    Common Array Algorithms
6.4    Using Arrays with Methods
6.5    Problem Solving: Adapting Algorithms
6.6    Problem Solving: Discovering Algorithms by Manipulating Physical Objects
6.7    Two-Dimensional Arrays
6.8    Array Lists

Chapter 7 Input/Output and Exception Handling

7.1    Reading and Writing Text Files
7.2    Processing Text Input
7.3    Command Line Arguments
7.4    Checked and Unchecked Exceptions
7.5    Catching Exceptions
7.6    The finally Clause
7.7    Application: Handling Input Errors

Chapter 8 Object and Classes

8.1    Object-Oriented Programming
8.2    Implementing a Simple Class
8.3    Specifying the Public Interface of a Class
8.4    Designing the Data Representation
8.5    Problem Solving: Patterns for Representing Behavior
8.6    Implementing Instance Methods
8.7    Constructors
8.8    Problem Solving: Tracing Objects
8.9    Testing a Class
8.10  Object References
8.11  Static Variables and Methods

Chapter 9 Inheritance

9.1    Inheritance Hierarchies
9.2    Implementing Subclasses
9.3    Overriding Methods
9.4    Polymorphism
9.5    Object: The Cosmic Superclass
9.6    Interface Types

Chapter 10 Graphical User Interfaces

10.1      Frame Windows
10.2      Events and Event Handling
10.3      Using Inheritance to Customize Frames
10.4      Building Applications with Buttons
10.5      Using Inner Classes for Listeners
10.6      Processing Text Input
10.7      Text Areas

Chapter 11 Advanced Graphical User Interfaces (Online Chapter)
(Download PDF KB)

11.1      Layout Management
11.2      Choices
11.3      Menus
11.4      Exploring the Swing Documentation
11.5      Drawing on a Component
11.6      Using Timer Events for Animations
11.7      Mouse Events

Chapter 12 Object-Oriented Design  (Online Chapter)
(Download PDF KB)
12.1      The Software Life Cycle
12.2      Discovering Classes
12.3      Relationships Between Classes
12.4      Cohesion and Coupling
12.5      Side Effects
12.5      Abstract Classes
12.6      Packages
12.7      Application: Printing an Invoice
12.8      Application: An Automatic Teller Machine

Chapter 13 Recursion  (Online Chapter)
(
Download  PDF KB)

13.1      Triangle Numbers
13.2.    Thinking Recursively
13.3      Recursive Helper Methods
13.4      The Efficiency of Recursion
13.5      Permutations
13.6      Mutual Recursions
13.7      Backtracking

Chapter 14 Sorting and Searching  (Online Chapter)

(Download  PDF KB)

14.1      Selection Sort
14.2      Profiling the Selection Sort Algorithm
14.3      Analyzing the Performance of the Selection Sort Algorithm
14.4      Merge Sort
14.5      Analyzing the Merge Sort Algorithm
14.6      Searching
14.7      Binary Search
14.8      Sorting Real Data

Chapter 15 The Java Collections Framework  (Online Chapter)
(Download PDF KB)

15.1.    An Overview of the Collections Framework
15.2.    Linked Lists
15.3.    Stacks, Queues, and Priority Queues
15.4.    Sets
15.5.    Maps

Appendices

APPENDIX A THE BASIC LATIN AND LATIN-1 SUBSETS OF UNICODE
APPENDIX B JAVA OPERATOR SUMMARY
APPENDIX C JAVA RESERVED WORD SUMMARY
APPENDIX D THE JAVA LIBRARY
APPENDIX E JAVA SYNTAX SUMMARY (Online only)
APPENDIX F HTML SUMMARY (Online only)
APPENDIX G TOOL SUMMARY (Online only)
APPENDIX H JAVADOC SUMMARY (Online only)

New To This Edition

  • Increased coverage of problem-solving: This edition adds practical, step-by-step illustrations of techniques that can help students devise and evaluation solutions to programming problems. Introduced within the chapters where they are most relevant, these strategies include
  • Algorithm design (with pseudocode)
  • Flowcharts
  • Hand-tracing
  • Storyboards
  • Adapting Algorithms
  • New author videos: Cay Horstmann provides mini-lectures on difficult concepts to help students understand the material more thoroughly.
  • Optional science/engineering and business exercises: End-of-chapter exercises have been enhanced with problems from engineering and business domains. Geared to students learning Java for engineering or business/Information Systems majors, the exercises are designed to illustrate the value of programming in those fields. These exercises are divided between the text and the online book companion site.
  • New and reorganized topics: All chapters were revised and enhanced to respond to user feedback and improve the flow of topics. A chapter on GUI (that was online only in the first edition) is now included in the printed book, while a chapter on data structures that was printed in the first edition is now an online chapter. New example tables, photos, and exercises appear throughout the book.
  • Additional programming examples: The author has added many new programming examples both in the book and online on the book companion site.

Horstmann, C. S. (2013) Big Data – Early Objects, International Student Version, Fifth Edition, Wiley

A more recent version of this book is available.

Download Source Code (ZIP 2,609KB)

Student Companion Web Site: http://bcs.wiley.com/he-bcs/Books?action=index&itemId=1118318773&bcsId=8070

Cay Horstmann’s fifth edition of Big Java provides a comprehensive and approachable introduction to fundamental programming techniques and design skills, helping students master basic concepts. The inclusion of advanced chapters makes the text suitable for a 2-semester course sequence, or as a comprehensive reference to programming in Java. Combining an updated and more visual design, with major rewrites to make the content easier to read, provides students with an extremely approachable text.  Filled with realistic programming examples, a great quantity and variety of homework assignments, and lab exercises that build student problem-solving abilities, it is no wonder Big Java is the number one text for early objects in the Java market.

Table of Contents

Chapter 1. Introduction

Chapter 2. Introduction to Objects and Classes

Chapter 3. Fundamental Data Types

Chapter 4. Decisions

Chapter 5. Loops

Chapter 6. Arrays and Array Lists

Chapter 7. Designing Classes

Chapter 8. Interfaces and Polymorphism

Chapter 9. Inheritance

Chapter 10. Input/Output and Exception Handling

Chapter 11. Object-Oriented Design

Chapter 12. Recursion

Chapter 13. Sorting and Searching

Chapter 14. The Java Collections Framework

Chapter 15. Basic Data Structures

Chapter 16. Tree Structures

Chapter 17. Generic Classes

Chapter 18. Graphical User Interfaces

Chapter 19. Streams and Binary Input/Output

===== Web Chapters  (Online only) =========

Chapter 20. Multithreading (Download PDF KB)

Chapter 21. Internet Networking (Download PDF KB)

Chapter 22. Relational Databases (Download PDF KB)

Chapter 23. XML (Download PDF KB)

Chapter 24. Web Applications (Download PDF KB)

===== Appendices =========

Appendix A: The Basic Latin and Latin-1 Subsets of Unicode

Appendix B: Java Operator Summary

Appendix C: Java Reserved Word Summary

Appendix D: The Java Library

Appendices E to J (Download PDF KB)

Appendix E: Java Syntax Summary

Appendix F: HTML Summary

Appendix G: Tool Summary

Appendix H: Javadoc Summary

Appendix I: Number Systems

Appendix J: Bit and Shift Operations

Appendix K: UML Summary

Appendix L: Java Language Coding Guidelines


51k6+zZaFxL__SX397_BO1,204,203,200_Barnes, D. J. and Kolling, M. (2011) Objects First With Java – A Practical Introduction Using BlueJ, Fifth Edition, Pearson, Prentice-Hall

A more recent edition is now available (Sixth Edition)

Companion Web Site: http://www.bluej.org/objects-first/
Program Style Guide: http://www.bluej.org/objects-first/styleguide.html
Book Projects: http://www.bluej.org/objects-first/ (ZIP 97.1MB)
Book Resourceshttp://www.bluej.org/objects-first/resources.html

This book is an introduction to object-oriented programming for beginners. The main focus of the book is general object-oriented and programming concepts from a software engineering perspective.

While the first chapters are written for students with no programming experience, later chapters are suitable for more advanced or professional programmers as well. In particular, programmers with experience in a non-object-oriented language who wish to migrate their skills into object orientation should also be able to benefit from the book.

We use two tools throughout the book to enable the concepts introduced to be put into practice: These tools are the Java programming language and the Java development environment BlueJ.

Chapter Sequence

Chapter 1 deals with the most fundamental concepts of object-orientation: objects, classes and methods. It gives a solid, hands-on introduction to these concepts without going into the details of Java syntax. It also gives a first look at some source code. We do this by using an example of graphical shapes which can be interactively drawn, and a second example of a simple laboratory class enrolment system.

Chapter 2 opens up class definitions and investigates how Java source code is written to create behavior of objects. We discuss how to define fields and implement methods. Here, we also introduce the first types of statements. The main example is an implementation of a ticket machine. We also look back to the laboratory class example from chapter 1 to investigate that a bit further.

Chapter 3 then enlarges the picture to discuss interaction of multiple objects. We see how objects can collaborate by invoking each otherÕs methods to perform a common task. We also discuss how one object can create other objects. A digital alarm clock display is discussed that uses two number display objects to show hours and minutes. As a second major example, we examine a simulation of an email system in which messages can be sent between mail clients.

In Chapter 4, we continue by building more extensive structures of objects. Most importantly, we start using collections of objects. We implement a music player and an auction system to introduce collections. At the same time, we discuss iterations over collection and have a first look at loops. The first collection being used is an ArrayList. In the second half of the chapter we introduce arrays as a special form of a collection, and the for loop as another form of a loop. We discuss an implementation of a web log analyzer as an example for array use.

Chapter 5 deals with libraries and interfaces. We introduce the Java standard library and discuss some important library classes. More importantly, we explain how to read and understand the library documentation. The importance of writing documentation in software development projects is discussed, and we end by practicing how to write suitable documentation for our own classes. Random, Set and Map are examples of classes that we encounter in this chapter. We implement an Eliza-like dialogue system and a graphical simulation of a bouncing ball to apply these classes.

In Chapter 6, we discuss more formally the issues of dividing a problem domain into classes for implementation. We introduce issues of designing classes well, including concepts such as responsibility-driven design, coupling, cohesion, and refactoring. An interactive, text-based, adventure game (World of Zuul) is used for this discussion. We go through several iterations of improving the internal class structure of the game and extending its functionality, and end with a long list of proposals for extensions that may be done as student projects.

Chapter 7, titled Well-behaved objects, deals with a whole group of issues connected to producing correct, understandable, and maintainable classes. It covers issues ranging from writing clear, understandable code – including style and commenting – to testing and debugging. Test strategies are introduced and a number of debugging methods are discussed in detail. We use an example of an online shopping site and an implementation of an electronic calculator to discuss these topics.

Chapters 8 and 9 introduce inheritance and polymorphism with many of the related detailed issues. We discuss a part of the implementation of a social networking site to illustrate the concepts. Issues of code inheritance, subtyping, polymorphic method calls and overriding are discussed in detail.

In Chapter 10 we implement a predator/prey simulation. This serves to discuss additional abstraction mechanisms based on inheritance, namely interfaces and abstract classes.

Chapter 11 introduces two new examples: an image viewer and a sound player. Both examples serve to discuss how to build graphical user interfaces (GUIs).

Chapter 12 then picks up the difficult issue of how to deal with errors. Several possible problems and solutions are discussed, and JavaÕs exception handling mechanism is discussed in detail. We extend and improve an address book application to illustrate the concepts.

Chapter 13 steps back to discuss in more detail the next level of abstraction: how to structure a vaguely described problem into classes and methods. In previous chapters we have assumed that large parts of the application structure already exist, and we have made improvements. Now it is time to discuss how we can get started from a clean slate. This involves detailed discussion of what the classes should be that implement our application, how they interact, and how responsibilities should be distributed. We use class-responsibilities-collaborators (CRC) cards to approach this problem, while designing a cinema booking system.

In Chapter 14, we try to bring everything together and integrate many topics from the previous chapters of the book. It is a complete case study, starting with the application design, through design of the class interfaces, down to discussing many important functional and non-functional characteristics and implementation details. Topics discussed in earlier chapters (such as reliability, data structures, class design, testing, extendibility, etc.) are applied again in a new context.


9781118318768.pdfHortsmann, C. S. (2014) Java Concepts – Early Objects, International Edition, Wiley

Note: An Eight Edition of this book is available

Student Companion Web Site:
http://bcs.wiley.com/he-bcs/Books?action=index&itemId=1118318765&bcsId=8078
Source Code: Download from here (ZIP 2,333KB)
Author’s Companion Web Site:
http://www.horstmann.com/bigjava5.html

Cay Horstmann’s seventh edition of Java Concepts provides an approachable introduction to fundamental programming techniques and design skills, helping students master basic concepts and become competent coders. Major rewrites and an updated visual design make this student-friendly text even more engaging.  The text is known for its realistic programming examples, great quantity and variety of homework assignments, and lab exercises that build student problem-solving abilities. The seventh edition now  includes problem solving sections, more example code online, and exercises from Science and Business.

Table of Contents
Chapter 1. Introduction
Chapter 2. Introduction to Objects and Classes
Chapter 3. Fundamental Data Types
Chapter 4. Decisions
Chapter 5. Loops
Chapter 6. Arrays and Array Lists
Chapter 7. Designing Classes
Chapter 8. Interfaces and Polymorphism
Chapter 9. Inheritance
Chapter 10. Input/Output and Exception Handling
Chapter 11. Object-Oriented Design

Web Chapters  (Online only)

Chapter 12. Recursion
Chapter 13. Sorting and Searching
Chapter 14. The Java Collections Framework

Appendices 

Appendix A: The Basic Latin and Latin-1 Subsets of Unicode
Appendix B: Java Operator Summary
Appendix C: Java Reserved Word Summary
Appendix D: The Java Library
Appendix E: Java Syntax Summary (online)
Appendix F: HTML Summary (online)
Appendix G: Tool Summary (online)
Appendix H: Javadoc Summary (online)
Appendix I: Number Systems (online)
Appendix J: Bit and Shift Operations (online)
Appendix K: UML Summary (online)
Appendix L: Java Language Coding Guidelines (online)


December, John (1995) Presenting JAVA – An Introduction to Java and HotJava, Sam Publishing

Historic interest.  This was the very first book ever written on the Java language.

This book teaches the reader how to incorporate sound, video, and animation into their Web pages. Through the design of “applets” — small Web applications that can be included in a Web page and downloaded, the programmer will enhance their own Web page. Java is the hottest new technology on the World Wide Web — this book shows programmers how to tap Java’s power and command this exciting new technology.
— Teaches how to design and program “applets” into Web
— Readers will be able to enhance their own Web pages

Table of Contents

Part I. Understanding the Potential of Java and the Web
Chapter 1. Java Makes Executable Content Possible
Chapter 2. Java’s Design Is Flexible and Dynamic
Chapter 3. Java Transforms the World Wide Web
Part II. Exploring Java Applications
Chapter 4. Java Animates Web Pages
Chapter 5. Java’s Applications are Interactive
Chapter 6. Java’s Applications are Distributed
Part III. Using the HotJava Browser
Chapter 7. HotJava is a View into Java
Chapter 8. HotJava is Different from Other Web Browsers
Chapter 9. HotJava Can Navigate the Web
Part IV. Developing Java Applications
Chapter 10. Java is a Programming Language
Chapter 11. Java is Object-Oriented
Chapter 12. Applet Development Involves Design and Implementation
Appendix A. Further Information Sources
Java Online Information Sources
Java Online Bibliography
Appendix B. Java Language Reference
Appendix C. HTML Tag Reference


Hubbard, J. R. (2004) Schaum’s Outline of Programming with Java (Schaum’s Outline Series), Second Edition, McGraw-Hill

Download eBook PDF (PDF 37,471KB) [First Edition]

Download Source Code (ZIP 433KB) [First Edition]
Download Source Code (ZIP 433KB) [Second Edition]

Tough Test Questions? Missed Lectures? Not Enough Time?

Fortunately for you, there’s Schaum’s Outlines. More than 40 million students have trusted Schaum’s to help them succeed in the classroom and on exams. Schaum’s is the key to faster learning and higher grades in every subject. Each Outline presents all the essential course information in an easy-to-follow, topic-by-topic format. You also get hundreds of examples, solved problems, and practice exercises to test your skills.

This Schaum’s Outline gives you

  • Practice problems with full explanations that reinforce knowledge
  • Coverage of the most up-to-date developments in your course field
  • In-depth review of practices and applications

Fully compatible with your classroom text, Schaum’s highlights all the important facts you need to know. Use Schaum’s to shorten your study time-and get your best test scores!

Master programming with Java with Schaums­­the high-performance study guide. It will help you cut study time, hone problem-solving skills, and achieve your personal best on exams! Students love Schaum’s Outlines because they produce results. Each year, hundreds of thousands of students improve their test scores and final grades with these indispensable study guides.

Get the edge on your classmates. Use Schaum’s! If you don’t have a lot of time but want to excel in class, this book helps you: brush up before tests; find answers fast; study quickly and more effectively; get the big picture without spending hours poring over lengthy textbooks. Schaum’s Outlines give you the information your teachers expect you to know in a handy and succinct format without overwhelming you with unnecessary details.

You get a complete overview of the subject. Plus, you get plenty of practice exercises to test your skill. Compatible with any classroom text, Schaum’s let you study at your pace and remind you of all the important facts you need to remember­­fast! And Schaum’s are so complete, they’re perfect for preparing for graduate or professional exams. Inside, you will find: over 200 problems, including step-by-step solutions; hundreds of additional practice problems, with answers; clear explanations of Java programming concepts and practices; easy-to-follow coverage of construction of animation applets, interactive applications, and other important Internet technology. If you want top grades and a thorough understanding of programming with Java, this powerful study tool is the best tutor you can have!


Hubbard, J. R. (2009) S, 2ed (Schaum’s Outline Series), Second Edition, McGraw-Hill

Download eBook PDF (PDF 5,878KB)
Download Source Code (ZIP 270KB)

Tough Test Questions? Missed Lectures? Not Enough Time?

Fortunately for you, there’s Schaum’s Outlines. More than 40 million students have trusted Schaum’s to help them succeed in the classroom and on exams. Schaum’s is the key to faster learning and higher grades in every subject. Each Outline presents all the essential course information in an easy-to-follow, topic-by-topic format. You also get hundreds of examples, solved problems, and practice exercises to test your skills.

This Schaum’s Outline gives you

  • Practice problems with full explanations that reinforce knowledge
  • Coverage of the most up-to-date developments in your course field
  • In-depth review of practices and applications

Fully compatible with your classroom text, Schaum’s highlights all the important facts you need to know. Use Schaum’s to shorten your study time-and get your best test scores!


 Goodrich, M. T., Tamassia, R. and Goldwasser, M. H. (2014) Data Structures and Algorithms in Java, International Edition, Sixth Edition, John Wiley & Sons

Download eBook PDF (PDF 10,177KB)
Download Source Code (ZIP 323KB)
[Change file extension to .jar]

Companion web site: http://ww0.java4.datastructures.net/

The design and analysis of efficient data structures has long been recognized as a key component of the Computer Science curriculum. Goodrich and Tomassia′s approach to this classic topic is based on the object–oriented paradigm as the framework of choice for the design of data structures. For each ADT presented in the text, the authors provide an associated Java interface. Concrete data structures realizing the ADTs are provided as Java classes implementing the interfaces. The Java code implementing fundamental data structures in this book is organized in a single Java package, net.datastructures. This package forms a coherent library of data structures and algorithms in Java specifically designed for educational purposes in a way that is complimentary with the Java Collections Framework.

Table of Contents

1 Java Primer
2 Object–Oriented Design
3 Fundamental Data Structures
4 Algorithm Analysis
5 Recursion
6 Stacks, Queues, and Deques
7 List and Iterator ADTs
8 Trees
9 Priority Queues
10 Maps, Hash Tables, and Skip Lists
11 Search Trees
12 Text Processing
13 Sorting and Selection
14 Graph Algorithms
15 Memory Management and B–Trees

PowerPoints

Chapter 1 – Java Primer 1: Types, Classes and Operators

Chapter 2 – Java Primer 2: I/O Methods and Control Flow

Chapter 2 – Object-Oriented Programming

Chapter 3 – Arrays

Chapter 3 – Doubly Linked Lists

Chapter 3 – Singly Linked Lists

Chapter 4 – Analysis of Algorithms

Chapter 5 – Recursion

Chapter 6 – Queues

Chapter 6 – Stacks

Chapter 8 – Trees