Introduce your beginning programmers to Java with Farrell's JAVA PROGRAMMING, 10th edition -- an engaging, hands-on approach for developing applications. With this dynamic text, even first-time programmers can quickly develop useful programs while mastering the basic principles of structured and object-oriented programming. Up-to-date, reader-friendly explanations and meaningful programming and collaboration exercises emphasize business applications, while useful debugging exercises and contemporary case problems further expand student understanding. All-new chapters offer comprehensive coverage of recursion as well as collections and generics. Step-by-step exercises in every chapter help students create multiple working programs -- enabling them to achieve success on their own.
Author(s): Joyce Farrell
Edition: 10
Publisher: Cengage
Year: 2023
Language: English
Pages: 674
Cover
Brief Contents
Contents
Preface
Chapter 1: Creating Java Programs
1.1 Learning Programming Terminology
1.2 Comparing Procedural and Object-Oriented Programming Concepts
1.3 Features of the Java Programming Language
1.4 Analyzing a Java Application That Produces Console Output
1.5 Compiling a Java Class and Correcting Syntax Errors
1.6 Running a Java Application and Correcting Logic Errors
1.7 Adding Comments to a Java Class
1.8 Creating a Java Application That Produces GUI Output
1.9 Finding Help
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 2: Uing Data
2.1 Declaring and Using Constants and Variables
2.2 Learning About Integer Data Types
2.3 Using the boolean Data Type
2.4 Learning About Floating-Point Data Types
2.5 Using the char Data Type
2.6 Using the Scanner Class to Accept Keyboard Input
2.7 Using the JOptionPane Class to Accept GUI Input
2.8 Performing Arithmetic Using Variables and Constants
2.9 Understanding Type Conversion
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 3: Using Methods
3.1 Understanding Method Calls and Placement
3.2 Understanding Method Construction
3.3 Adding Parameters to Methods
3.4 Creating Methods That Return Values
3.5 Understanding Blocks and Scope
3.6 Overloading a Method
3.7 Learning about Ambiguity
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 4: Using Classes and Objects
4.1 Learning About Classes and Objects
4.2 Creating a Class
4.3 Creating Instance Methods in a Class
4.4 Declaring Objects and Using Their Methods
4.5 Understanding That Classes Are Data Types
4.6 Creating and Using Constructors
4.7 Learning About the this Reference
4.8 Using static Fields
4.9 Using Imported, Prewritten Constants and Methods
4.10 Understanding Composition and Nested Classes
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 5: Making Decisions
5.1 Planning Decision-Making Logic
5.2 The if and if…else Statements
5.3 Using Multiple Statements in if and if…else Clauses
5.4 Nesting if and if…else Statements
5.5 Using Logical AND and OR Operators
5.6 Making Accurate and Efficient Decisions
5.7 Using switch
5.8 Using the Conditional and NOT Operators
5.9 Understanding Operator Precedence
5.10 Making Constructors More Efficient by Using Decisions in Other Methods
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 6: Looping
6.1 Learning About the Loop Structure
6.2 Creating while Loops
6.3 Using Shortcut Arithmetic Operators
6.4 Creating a for Loop
6.5 Learning How and When to Use a do…while Loop
6.6 Learning About Nested Loops
6.7 Improving Loop Performance
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 7: Characters, Strings, and the StringBuilder
7.1 Understanding String Data Problems
7.2 Using Character Class Methods
7.3 Declaring and Comparing String Objects
7.4 Using a Variety of String Methods
7.5 Learning About the StringBuilder and StringBuffer Classes
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 8: Arrays
8.1 Declaring an Array
8.2 Initializing an Array
8.3 Using Variable Subscripts with an Array
8.4 Declaring and Using Arrays of Objects
8.5 Searching an Array and Using Parallel Arrays
8.6 Passing Arrays to and Returning Arrays from Methods
8.7 Sorting Array Elements
8.8 Using Two-Dimensional and Other Multidimensional Arrays
8.9 Using the Arrays Class
8.10 Creating Enumerations
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 9: Inheritance and Interfaces
9.1 Learning About the Concept of Inheritance
9.2 Extending Classes
9.3 Overriding Superclass Methods
9.4 Calling Constructors During Inheritance
9.5 Accessing Superclass Methods
9.6 Employing Information Hiding
9.7 Methods You Cannot Override
9.8 Creating and Using Abstract Classes
9.9 Using Dynamic Method Binding
9.10 Creating Arrays of Subclass Objects
9.11 Using the Object Class and Its Methods
9.12 Creating and Using Interfaces
9.13 Using records, Anonymous Inner Classes, and Lambda Expressions
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 10: Exception Handling
10.1 Learning About Exceptions
10.2 Trying Code and Catching Exceptions
10.3 Throwing and Catching Multiple Exceptions
10.4 Using the finally Block
10.5 Understanding the Advantages of Exception Handling
10.6 Specifying the Exceptions That a Method Can Throw
10.7 Tracing Exceptions Through the Call Stack
10.8 Creating Your Own Exception Classes
10.9 Using Assertions
10.10 Displaying the Virtual Keyboard
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 11: File Input and Output
11.1 Understanding Computer Files
11.2 Using the Path and Files Classes
11.3 File Organization, Streams, and Buffers
11.4 Using Java's IO Classes
11.5 Creating and Using Sequential Data Files
11.6 Learning About Random Access Files
11.7 Writing Records to a Random Access Data File
11.8 Reading Records from a Random Access Data File
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 12: Recursion
12.1 Understanding Recursion
12.2 Using Recursion to Solve Mathematical Problems
12.3 Using Recursion to Manipulate Strings
12.4 Using Recursion to Create Visual Patterns
12.5 Recursion’s Relationship to Iterative Programming
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 13: Collections and Generics
13.1 Understanding the Collection Interface
13.2 Understanding the List Interface
13.3 Using the ArrayList Class
13.4 Using the LinkedList Class
13.5 Using Iterators
13.6 Creating Generic Classes
13.7 Creating Generic Methods
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Chapter 14: Introduction to Swing Components
14.1 Understanding Swing Components
14.2 Using the JFrame Class
14.3 Using the JLabel Class
14.4 Using a Layout Manager
14.5 Extending the JFrame Class
14.6 Adding JTextFields and JButtons to a JFrame
14.7 Learning About Event-Driven Programming
14.8 Understanding Swing Event Listeners
14.9 Using the JCheckBox, ButtonGroup, and JComboBox Classes
Don't Do It
Summary
Key Terms
Review Questions
Programming Exercises
Debugging Exercises
Game Zone
Case Problems
Appendix A: Working with the Java Platform
Appendix B: Data Representation
Appendix C: Formatting Output
Appendix D: Generating Random Numbers
Appendix E: Javadoc
Appendix F: Using JavaFX and Scene Builder
Glossary
Index