Table of Contents

Cover

Frontmatter

Acknowledgments

About the Author

Introduction

Who Should Read This Book

What Is Covered in This Book

The Essentials Series

How to Contact the Author

Chapter 1: Introducing the Basics of Java

Understanding Java Class Structure

Writing a main() Method

Importing Other Java Classes

Understanding Variable Scope in Java Code

Chapter 2: Applying Data Types in Java Programming

Creating, Using, and Destroying Objects

Distinguishing between Object References and Primitives

Declaring and Initializing Variables

Default Initialization of Variables

Reading and Writing Object Fields

Using the StringBuilder Class and Its Methods

Creating and Manipulating Strings

Chapter 3: Using Java Operators and Conditional Logic

Using Java Operators

Using Parentheses to Control Operators

Understanding Object Equality

Using if and if/else Statements

Using a switch Statement

Chapter 4: Using Java Arrays

Understanding Java Arrays

Using a One-Dimensional Array

Using a Multi-Dimensional Array

Using an ArrayList Object

Chapter 5: Using Loops in Java Code

Applying while Loops

Applying do/while Loops

Applying for and For-Each Loops

Comparing Loop Constructs

Using continue and break Statements

Chapter 6: Encapsulating Data and Exposing Methods in Java

Encapsulating Data

Exposing Data through Methods

Applying Access Modifiers

Abstracting Data

Chapter 7: Using Java Methods to Communicate

Designing Methods

Overloading Methods

Declaring Methods and Fields static

Passing Data among Methods

Chapter 8: Using Java Constructors

Using the Default Constructor

Defining Alternate Constructors

Adding Parameters to Constructors

Overloading Constructors

Chapter 9: Inheriting Code and Data in Java

Extending a Class

Using the super Keyword

Overriding a Method

Casting Objects

Implementing Polymorphic Behavior

Chapter 10: Understanding Java Interfaces and Abstract Classes

Understanding Abstract Types

Using Abstract Classes

Using Interfaces

Using the enum Type

Distinguishing between Abstract and Concrete References

Chapter 11: Throwing and Catching Exceptions in Java

Understanding the Role Exceptions Play

Using a try-catch Block

Understanding Exception Types

Calling Methods That Throw Exceptions

Recognizing Common Exception Types

Appendix A: Answers to Review Questions

Chapter 1: Introducing the Basics of Java

Chapter 2: Applying Data Types in Java Programming

Chapter 3: Using Java Operators and Conditional Logic

Chapter 4: Using Java Arrays

Chapter 5: Using Loops in Java Code

Chapter 6: Encapsulating Data and Exposing Methods in Java

Chapter 7: Using Java Methods to Communicate

Chapter 8: Using Java Constructors

Chapter 9: Inheriting Code and Data in Java

Chapter 10: Understanding Java Interfaces and Abstract Classes

Chapter 11: Throwing and Catching Exceptions in Java

Appendix B: OCA Certification Program

Certification Objectives Map

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.171.51