Covers Oracle Certified Professional, Java SE 6 Programmer Exam (1Z0-851)

Table of Contents

Contents
Writing the Third Edition
About This Book
Using the Book
Book Web Sites
Request for Feedback
About the Authors
Acknowledgments (First Edition)
Acknowledgments (Second Edition)
Acknowledgments (Third Edition)
1Basics of Java Programming
1.1Introduction
1.2Classes
1.3Objects
1.4Instance Members
1.5Static Members
1.6Inheritance
1.7Aggregation
1.8Tenets of Java
1.9Java Programs
1.10Sample Java Application
2Language Fundamentals
2.1Basic Language Elements
2.2Primitive Data Types
2.3Variable Declarations
2.4Initial Values for Variables
3Declarations
3.1Class Declarations
3.2JavaBeans Standard
3.3Method Declarations
3.4Constructors
3.5Enumerated Types
3.6Arrays
3.7Parameter Passing
3.8Variable Arity Methods
3.9The main() Method
4Access Control
4.1Java Source File Structure
4.2Packages
4.3Searching for Classes
4.4The JAR Utility
4.5System Properties
4.6Scope Rules
4.7Accessibility Modifiers for Top-level Type Declarations
4.8Other Modifiers for Classes
4.9Member Accessibility Modifiers
4.10Other Modifiers for Members
5Operators and Expressions
5.1Conversions
5.2Type Conversion Contexts
5.3Precedence and Associativity Rules for Operators
5.4Evaluation Order of Operands
5.5The Simple Assignment Operator =
5.6Arithmetic Operators: * , / , % , + , -
5.7The Binary String Concatenation Operator +
5.8Variable Increment and Decrement Operators: ++ , --
5.9Boolean Expressions
5.10Relational Operators: < , <= , > , >=
5.11Equality
5.12Boolean Logical Operators: ! , ^ , & , |
5.13Conditional Operators: && , ||
5.14The Conditional Operator: ?
5.15Other Operators: new , [] , instanceof
6Control Flow
6.1Overview of Control Flow Statements
6.2Selection Statements
6.3Iteration Statements
6.4Transfer Statements
6.5Stack-based Execution and Exception Propagation
6.6Exception Types
6.7Exception Handling: try , catch , and finally
6.8The throw Statement
6.9The throws Clause
6.10Assertions
7Object-oriented Programming
7.1Single Implementation Inheritance
7.2Overriding Methods
7.3Hiding Members
7.4The Object Reference super
7.5Chaining Constructors Using this() and super()
7.6Interfaces
7.7Arrays and Subtyping
7.8Reference Values and Conversions
7.9Reference Value Assignment Conversions
7.10Method Invocation Conversions Involving References
7.11Reference Casting and the instanceof Operator
7.12Polymorphism and Dynamic Method Lookup
7.13Inheritance vs. Aggregation
7.14Basic Concepts in Object-Oriented Design
8Nested Type Declarations
8.1Overview of Nested Type Declarations
8.2Static Member Types
8.3Non-static Member Classes
8.4Local Classes
8.5Anonymous Classes
9Object Lifetime
9.1Garbage Collection
9.2Reachable Objects
9.3Facilitating Garbage Collection
9.4Object Finalization
9.5Finalizer Chaining
9.6Invoking Garbage Collection Programmatically
9.7Initializers
9.8Field Initializer Expressions
9.9Static Initializer Blocks
9.10Instance Initializer Blocks
9.11Constructing Initial Object State
10Fundamental Classes
10.1Overview of the java.lang Package
10.2The Object Class
10.3The Wrapper Classes
10.4The String Class
10.5The StringBuilder and the StringBuffer Classes
11Files and Streams
11.1Input and Output
11.2The File Class
11.3Byte Streams: Input Streams and Output Streams
11.4Character Streams: Readers and Writers
11.5The Console class
11.6Object Serialization
12Localization, Pattern Matching and Formatting
12.1The java.util.Locale Class
12.2The java.util.Date Class
12.3The java.util.Calendar Class
12.4The java.text.DateFormat Class
12.5The java.text.NumberFormat Class
12.6String Pattern Matching using Regular Expressions
12.7Formatting Values
13Threads
13.1Multitasking
13.2Overview of Threads
13.3The Main Thread
13.4Thread Creation
13.5Synchronization
13.6Thread Transitions
14Generics
14.1Introducing Generics
14.2Generic Types and Parameterized Types
14.3Collections and Generics
14.4Wildcards
14.5Using References of Wildcard Parameterized Types
14.6Bounded Type Parameters
14.7Implementing a Simplified Generic Stack
14.8Generic Methods and Constructors
14.9Wildcard Capture
14.10Flexibility with Wildcard Parameterized Types
14.11Type Erasure
14.12Implications for Overloading and Overriding
14.13Limitations and Restrictions on Generic Types
15Collections and Maps
15.1Comparing Objects
15.2The Java Collections Framework
15.3Collections
15.4Sets
15.5The SortedSet<E> and NavigableSet<E> Interfaces
15.6Lists
15.7Queues
15.8Maps
15.9Map Implementations
15.10The SortedMap<K,V> and NavigableMap<K,V> Interfaces
15.11Working with Collections
ATaking the SCJP 1.6 Exam
A.1Preparing for the Programmer Exam
A.2Registering for the Exam
A.3How the Examination Is Conducted
A.4The Questions
A.5Moving on to other Java Technology Exams
BObjectives for the SCJP 1.6 Exam
CObjectives for the SCJP 1.6 Upgrade Exam
DAnnotated Answers to Review Questions
ESolutions to Programming Exercises
FMock Exam
GNumber Systems and Number Representation
G.1Number Systems
G.2Relationship between Binary, Octal, and Hexadecimal Numbers
G.3Converting Decimals
G.4Representing Integers
Index

Khalid A. Mughal   •   Rolf W. Rasmussen