An edition of Java Methods A&AB, AP Edition (2006)

Java Methods A&AB, AP Edition

Student edition

My Reading Lists:

Create a new list


Buy this book

Last edited by Drini
September 22, 2025 | History
An edition of Java Methods A&AB, AP Edition (2006)

Java Methods A&AB, AP Edition

Student edition

Once again, the Litvins bring you a textbook that expertly covers the subject, is fun to read, and works for students with different learning styles. In one volume, this edition covers both introductory Java/OOP A-level material and AB-level topics (data structures and algorithms). The book follows Java 5.0 - 6.0 and incorporates many other changes, big and small, to reflect the current priorities of the AP CS program. This edition offers an early focus on object-oriented programming and design and an expanded discussion of the Java collections framework. What has not changed is the authors' respect for students, clear explanation of concepts, common sense about practical software development issues, and realistic and fun case studies and labs. By choosing this book, you have joined the many thousands of students who have mastered computer science fundamentals and received high grades on AP CS exams using the Litvins' C++ and Java books.

Publish Date
Language
English
Pages
688

Buy this book

Previews available in: English

Edition Availability
Cover of: Java Methods A&AB, AP Edition
Java Methods A&AB, AP Edition
March 15, 2006, Skylight Publishing
Textbook Binding in English - Student edition

Add another edition?

Book Details


First Sentence

"This book offers a thorough introduction to the concepts and practices of object-oriented programming in Java."

Table of Contents

Preface
Page xvii
How to Use This Book
Page xxi
Chapter 1. An Introduction to Hardware, Software, and the Internet
Page 1
1.1. Prologue
Page 2
1.2. Hardware Overview
1.2.1. The CPU
1.2.2. Memory
1.2.3. Secondary Storage Devices
1.2.4. Input and Output Devices
1.3. Software Overview
1.4. What Do Programmers Do?
1.5. Representation of Information in Computer Memory
1.5.1. Numbers
1.5.2. Characters
1.6. The Internet
1.7. Summary
Exercises
Page 5
Chapter 2. An Introduction to Software Development
Page 11
2.1. Prologue
Page 12
2.2. Compilers and Interpreters
Page 14
2.3. Software Components and Packages
Page 20
2.4. Lab: Three Ways to Say Hello
Page 21
2.5. Object-Oriented Programming
Page 27
2.6. Lab: More Ways to Say Hello
Page 30
2.7. Summary
Page 37
Exercises
Page 38
Chapter 3. Objects and Classes
Page 43
3.1. Prologue
Page 44
3.2. Objects in a Program: An Example
Page 45
3.3. Classes
Page 49
3.4. Fields, Constructors, and Methods
Page 54
3.5. Case Study and Lab: First Steps
Page 59
3.6. Inheritance
Page 62
3.7. Summary
Page 67
Exercises
Page 69
Chapter 4. Algorithms
Page 75
4.1. Prologue
Page 76
4.2. Properties of Algorithms
Page 77
4.3. Iterations
Page 82
4.4. Recursion
Page 83
4.5. Case Study: Euclid's GCF Algorithm
Page 86
4.6. Working with Lists
Page 88
4.7. Case Study: File Manager
Page 90
4.8. Summary
Page 94
Exercises
Page 95
Chapter 5. Java Syntax and Style
Page 103
5.1. Prologue
Page 104
5.2. Using Comments
Page 105
5.3. Reserved Words and Programmer-Defined Names
Page 107
5.4. Syntax vs. Style
Page 110
5.5. Statements, Blocks, Indentation
Page 114
5.6. Lab: Correcting Syntax Errors
Page 115
5.7. Summary
Page 117
Exercises
Page 118
Chapter 6. Data Types, Variables, and Arithmetic
Page 121
6.1. Prologue
Page 122
6.2. Declaring Fields and Local Variables
Page 124
6.3. Primitive Data Types
Page 128
6.4. Strings
Page 129
6.5. Constants
Page 130
6.6. Scope of Variables
Page 133
6.7. Arithmetic Expressions
Page 134
6.8. Compound Assignment and Increment Operators
Page 138
6.9. Converting Numbers and Objects into Strings
Page 140
6.10. Lab: Pie Chart
Page 143
6.11. Summary
Page 145
Exercises
Page 146
Chapter 7. Boolean Expressions and if-else Statements
Page 153
7.1. Prologue
Page 154
7.2. if-else Statements
Page 156
7.3. boolean Data Type
Page 157
7.4. Relational Operators
Page 158
7.5. Logical Operators
Page 160
7.6. Order of Operators
Page 162
7.7. Short-Circuit Evaluation
Page 163
7.8. if-else-if and Nested if-else
Page 164
7.9. Case Study and Lab: Rolling Dice
Page 169
7.10. The switch statement
Page 178
7.11. Enumerated Data Types
Page 180
7.12. Case Study and Lab: Rolling Dice Concluded
Page 183
7.13. Summary
Page 186
Exercises
Page 188
Chapter 8. Iterative Statements: while, for, do-while
Page 193
8.1. Prologue
Page 194
8.2. The while and for Loops
Page 194
8.3. The do-while Loop
Page 198
8.4. return and break in Loops
Page 199
8.5. Nested Loops
Page 201
8.6. Lab: Perfect Numbers
Page 204
8.7. Summary
Page 205
Exercises
Page 206
Chapter 9. Implementing Classes and Using Objects
Page 211
9.1. Prologue
Page 212
9.2. Public and Private Features of a Class
Page 216
9.3. Constructors
Page 218
9.4. References to Objects
Page 222
9.5. Defining Methods
Page 223
9.6. Calling Methods and Accessing Fields
Page 226
9.7. Passing Parameters to Constructors and Methods
Page 229
9.8. return Statement
Page 232
9.9. Case Study and Lab: Snack Bar
Page 235
9.10. Overloaded Methods
Page 240
9.11. Static Fields and Methods
Page 243
9.12. Case Study and Lab: Snack Bar Concluded
Page 248
9.13. Summary
Page 249
Exercises
Page 251
Chapter 10. Strings
Page 259
10.1. Prologue
Page 260
10.2. Literal Strings
Page 260
10.3. String Constructors and Immutability
Page 261
10.4. String Methods
Page 264
10.5. Formatting Numbers into Strings
Page 271
10.6. Extracting Numbers from Strings
Page 274
10.7. Character Methods
Page 275
10.8. Lab: Lipograms
Page 276
10.9. The StringBuffer Class
Page 278
10.10. Summary
Page 280
Exercises
Page 281
Chapter 11. Class Hierarchies and Interfaces
Page 287
11.1. Prologue
Page 288
11.2. Class Hierarchies and Polymorphism
Page 289
11.3. Abstract Classes
Page 294
11.4. Invoking Superclass's Constructors
Page 298
11.5. Calling Superclass's Methods
Page 300
11.6. Case Study: Dance Studio
Page 302
11.7. Interfaces
Page 306
11.8. Case Study: Dance Studio Concluded
Page 310
11.9. Summary
Page 314
Exercises
Page 317
Chapter 12. Arrays and ArrayLists
Page 321
12.1. Prologue
Page 322
12.2. One-Dimensional Arrays
Page 323
12.3. Lab: Fortune Teller
Page 327
12.4. The ArrayList Class
Page 327
12.5. ArrayList's Constructors and Methods
Page 331
12.6. ArrayList's Pitfalls
Page 333
12.7. Iterations and the "For Each" Loop
Page 336
12.8. Inserting and Removing Elements
Page 339
12.9. Lab: Creating an Index for a Document
Page 340
12.10. Two-Dimensional Arrays
Page 344
12.11. Case Study and Lab: Chomp
Page 346
12.12. Summary
Page 352
Exercises
Page 354
Chapter 13. Searching and Sorting
Page 363
13.1. Prologue
Page 364
13.2. equals, compareTo, and compare
Page 365
13.3. Sequential and Binary Search
Page 371
13.4. Lab: Keeping Things in Order
Page 375
13.5. Selection Sort
Page 376
13.6. Insertion Sort
Page 377
13.7. Mergesort
Page 379
13.8. Quicksort
Page 382
13.9. Lab: Benchmarks
Page 384
13.10. java.util.Arrays and java.util.Collections
Page 386
13.11. Summary
Page 388
Exercises
Page 390
Chapter 14. Streams and Files
Page 393
14.1. Prologue
Page 394
14.2. Pathnames and the java.io.File Class
Page 396
14.3. Reading from a Text File
Page 398
14.4. Writing to a Text File
Page 401
14.5. Lab: Choosing Words
Page 403
14.6. Summary
Page 404
Exercises
Page 405
Chapter 15. Graphics
Page 409
15.1. Prologue
Page 410
15.2. paint, paintComponent, and repaint
Page 412
15.3. Coordinates
Page 415
15.4. Colors
Page 418
15.5. Drawing Shapes
Page 419
15.6. Fonts and Text
Page 421
15.7. Case Study and Lab: Pieces of the Puzzle
Page 422
15.8. Summary
Page 429
Exercises
Page 430
Chapter 16. GUI Components and Events
Page 433
16.1. Prologue
Page 434
16.2. Pluggable Look and Feel
16.3. Basic Swing Components and Their Events
16.4. Layouts
16.5. Menus
16.6. Case Study and Lab: the Ramblecs Game
16.7. Summary
Exercises
Page 436
Chapter 17. Mouse, Keyboard, Sounds, and Images
Page 441
17.1. Prologue
Page 442
17.2. Mouse Events Handling
17.3. Keyboard Events Handling
17.4. Case Study and Lab: Drawing Editor
17.5. Sounds and Images
17.6. Case Study and Lab: Ramblecs Concluded
17.7. Summary
Exercises
Page 443
Chapter 18. Big-O Analysis of Algorithms
Page 445
18.1. Prologue
Page 446
18.2. The Big-O Concept
Page 447
18.3. Big-O of Sorting Algorithms
Page 455
18.4. Summary
Page 459
Exercises
Page 461
Chapter 19. The Java Collections Framework
Page 465
19.1. Prologue
Page 466
19.2. Collection and Iterator
Page 468
19.3. Lists and ListIterator
Page 472
19.4. The Stack Class
Page 478
19.5. The Queue Interface
Page 480
19.6. The PriorityQueue Class
Page 482
19.7. Sets
Page 484
19.8. Maps
Page 487
19.9. Case Study and Lab: Stock Exchange
Page 492
19.10. Summary
Page 499
Exercises
Page 499
Chapter 20. Lists and Iterators
Page 507
20.1. Prologue
Page 508
20.2. Singly-Linked List
Page 508
20.3. Traversals
Page 514
20.4. Lab: Implementing a Singly-Linked List
Page 516
20.5. Linked List with a Tail
Page 517
20.6. Doubly-Linked List and Circular List
Page 518
20.7. Lab: Teletext
Page 521
20.8. Summary
Page 522
Exercises
Page 523
Chapter 21. Stacks and Queues
Page 527
21.1. Prologue
Page 528
21.2. Implementations of Stacks
Page 528
21.3. Lab: Browsing
Page 531
21.4. The Hardware Stack
Page 533
21.5. Implementations of Queues
Page 535
21.6. Case Study and Lab: Actors World
Page 536
21.7. Summary
Page 541
Exercises
Page 542
Chapter 22. Recursion Revisited
Page 547
22.1. Prologue
Page 548
22.2. Three Examples
Page 548
22.3. When Not to Use Recursion
Page 556
22.4. Understanding and Debugging Recursive Methods
Page 559
22.5. Lab: the Tower of Hanoi
Page 562
22.6. Case Study and Lab: the Game of Hex
Page 563
22.7. Summary
Page 568
Exercises
Page 568
Chapter 23. Binary Trees
Page 575
23.1. Prologue
Page 576
23.2. Implementations of Binary Trees
Page 581
23.3. Traversals
Page 583
23.4. Binary Search Trees
Page 584
23.5. A Do-It-Yourself BST
Page 586
23.6. Lab: Morse Code
Page 591
23.7. Case Study and Lab: Java Messenger
Page 592
23.8. Summary
Page 594
Exercises
Page 595
Chapter 24. Lookup Tables and Hashing
Page 603
24.1. Prologue
Page 604
24.2. Lookup Tables
Page 604
24.3. Lab: Cryptogram Solver
Page 607
24.4. Hash Tables
Page 610
24.5. java.util's HashSet and HashMap
Page 613
24.6. Lab: Search Engine
Page 615
24.7. Summary
Page 617
Exercises
Page 618
Chapter 25. Heaps and Priority Queues
Page 623
25.1. Prologue
Page 624
25.2. Implementations of Priority Queues
Page 624
25.3. Binary Trees: Non-Linked Representation
Page 626
25.4. A Do-It-Yourself Priority Queue
Page 628
25.5. Lab: Heapsort
Page 632
25.6. Summary
Page 633
Exercises
Page 634
Chapter 26. Design Patterns
Page 637
26.1. Prologue
Page 638
26.2. Facade
26.3. Strategy
26.4. Singleton
26.5. Decorator
26.6. Composite
26.7. MVC (Model-View-Controller)
26.8. Summary
Exercises
Page 640
Appendices
Page 645
A. The 17 Bits of Style
B. Common Syntax Error Messages
C. HTML Tutorial
D. GUI Examples Index
E. The EasyReader, EasyWriter, EasySound, EasyDate, and EasyFormat Classes
F. Computing in Context: Responsible and Ethical Computer Use
Solutions to Selected Exercises
Page 645
Index of Tables and Figures
Page 647
Index
Page 653

Edition Notes

Genre
Textbook

Classifications

Library of Congress
QA76.73.J38 L5847 2006

The Physical Object

Format
Textbook Binding
Number of pages
688
Dimensions
9.3 x 7.6 x 1.4 inches
Weight
3 pounds

Edition Identifiers

Open Library
OL9792104M
Internet Archive
javamethodsabobj0000litv
ISBN 10
0972705570
ISBN 13
9780972705578
OCLC/WorldCat
70273173
LibraryThing
9080171
Goodreads
4874060

Work Identifiers

Work ID
OL15002410W

Work Description

Once again, the Litvins bring you a textbook that expertly covers the subject, is fun to read, and works for students with different learning styles. In one volume, this edition covers both introductory Java/OOP A-level material and AB-level topics (data structures and algorithms). The book follows Java 5.0 and incorporates many other changes, big and small, to reflect the current priorities of the AP CS program. This edition offers an early focus on object-oriented programming and design and an expanded discussion of the Java collections framework. What has not changed is the authors' respect for students, clear explanation of concepts, common sense about practical software development issues, and realistic and fun case studies and labs. By choosing this book, you have joined the many thousands of students who have mastered computer science fundamentals and received high grades on AP CS exams using the Litvins' C++ and Java books. - Back cover.

Community Reviews (0)

No community reviews have been submitted for this work.

Lists

History

Download catalog record: RDF / JSON / OPDS | Wikipedia citation
September 22, 2025 Edited by Drini Add TOC from Tocky
December 20, 2023 Edited by ImportBot import existing book
December 4, 2022 Edited by ImportBot import existing book
November 16, 2022 Edited by ImportBot import existing book
April 30, 2008 Created by an anonymous user Imported from amazon.com record