about this book

This book is written for developers with a working knowledge of Java who want to earn the OCA Java SE 7 Programmer certification. It uses powerful tools and features to make reaching your goal of certification a quick, smooth, and enjoyable experience. This section will explain the features used in the book and tell you how to use the book to get the most out of it as you prepare for the certification exam. More information on the exam and on how the book is organized is available in the Introduction.

Start your preparation with the chapter-based exam objective map

I strongly recommend a structured approach to preparing for this exam. To help you with this task, I’ve developed a chapter-based exam objective map, as shown in figure 1. The full version is in the Introduction (table I.3).

Figure 1 The Introduction to this book provides a list of all exam objectives and the corresponding chapter and section numbers where they are covered. See the full table in the Introduction (table I.3).

As you go through your preparation, mark your readiness score for each section. Selfassessment is an important tool that will help you determine when you are ready to take the exam.

The map in the Introduction shows the complete exam objective list mapped to the relevant chapter and section numbers. You can jump to the relevant section number to work on a particular exam topic.

Chapter-based objectives

Each chapter starts with a list of the exam objectives covered in that chapter, as shown in figure 2. This list is followed by a quick comparison of the major concepts and topics covered in the chapter with real-world objects and scenarios.

Figure 2 An example of the list of exam objectives and brief explanations at the beginning of each chapter

Section-based objectives

Each main section in a chapter starts by identifying the exam objective(s) that it covers. Each listed exam topic starts with the exam objective and its subobjective number.

In figure 3, the number 4.4 refers to section 4.4 in chapter 4 (the complete list of chapters and sections can be found in the table of contents). The 4.3 preceding the exam objective refers to the objective’s numbering in the list of exam objectives on Oracle’s website (the complete numbered list of exam objectives is given in table I.3 in the Introduction).

Figure 3 An example of the beginning of a section, identifying the exam objective that it covers

Exam tips

Each chapter provides multiple exam tips to re-emphasize the points that are the most confusing, overlooked, or frequently answered incorrectly by candidates and that therefore require special attention for the exam. Figure 4 shows an example.

Figure 4 Example of an exam tip; they occur multiple times in a chapter

Notes

All chapters also include multiple notes, which draw your attention to points that should be noted while you’re preparing for the exam. Figure 5 shows an example.

Figure 5 Example note

Sidebars

Sidebars contain information that may not be directly relevant to the exam but that is related to it. Figure 6 shows an example.

Figure 6 Example sidebar

Images

I’ve used a lot of images in the chapters for an immersive learning experience. I believe that a simple image can help you understand a concept quickly, and a little humor can help you to retain information longer.

Simple images are used to draw your attention to a particular line of code (as shown in figure 7).

Figure 7 An example image that draws your attention to a particular line of code

I’ve used pictorial representation of data in arrays (figure 8) and other data types to aid visualization and understanding.

Figure 8 An example pictorial representation of data in an array

To reinforce important points and help you retain them longer, a little humor has been added using comic strips (as in figure 9).

Figure 9 An example of a little humor to help you remember that the finally block always executes

I’ve also used images to group and represent information for quick reference. Figure 10 shows an example of the protected members that can be accessed by derived or unrelated classes in the same or separate packages. I strongly recommend that you try to create a few of your own figures like these.

Figure 10 An example of grouping and representing information for quick reference

An image can also add more meaning to a sequence of steps also explained in the text. For example, figure 11 seems to bring the Java compiler to life by allowing it to talk with you and convey what it does when it gets to compile a class that doesn’t define a constructor. Again, try a few of your own! It’ll be fun!

Figure 11 An example pictorial representation of steps executed by the Java compiler when it compiles a class without a constructor

The exam requires that you know multiple methods from classes such as String, StringBuilder, ArrayList, and others. The number of these methods can be overwhelming, but grouping these methods according to their functionality can make this task a lot more manageable. Figure 12 shows an example of an image that groups methods of the String class according to their functionality.

Figure 12 An example image used to group methods of the String class according to their functionality.

Expressions that involve multiple operands can be hard to comprehend. Figure 13 is an example of an image that can save you from the mayhem of unary increment and decrement operators used in prefix and postfix notation.

Figure 13 Example of values taken by the operands during execution of an expression

Code snippets that define multiple points and that may result in the nonlinear execution of code can be very difficult to comprehend. These may include selection statements, loops, or exception-handling code. Figure 14 is an example of an image that clearly outlines the lines of code that will execute.

Figure 14 An example of flow of control in a code snippet that may define multiple points of nonlinear execution of code

Twist in the Tale exercises

Each chapter includes a few Twist in the Tale exercises. For these exercises, I’ve tried to use modified code from the examples already covered in a chapter, and the “Twist in the Tale” title refers to modified or tweaked code. These exercises highlight how even small code modifications can change the behavior of your code. They should encourage you to carefully examine all of the code in the exam.

My main reason for including these exercises is that on the real exam, you may get to answer more than one question that seems to define exactly the same question and answer options. But upon closer inspection, you’ll realize that these questions differ slightly, and that these differences change the behavior of the code and the correct answer option.

The answers to all of the Twist in the Tale exercises are given in the appendix.

Code Indentation

Some of the examples in this book show incorrect indentation of code. This has been done on purpose because on the real exam you can’t expect to see perfectly indented code. You should be able to comprehend incorrectly indented code to answer an exam question correctly.

Review notes

When you’re ready to take your exam, don’t forget to reread the review notes a day before or on the morning of the exam. These notes contain important points from each chapter as a quick refresher.

Exam questions

Each chapter concludes with a set of 10 to 11 exam questions. These follow the same pattern as the real exam questions. Attempt these exam questions after completing a chapter.

Answers to exam questions

The answers to all exam questions provide detailed explanations, including why options are correct or incorrect. Mark your incorrect answers and identify the sections that you need to reread. If possible, draw a few diagrams—you’ll be amazed at how much they can help you retain the concepts. Give it a try—it’ll be fun!

Author Online

The purchase of OCA Java SE 7 Programmer I Certification Guide includes free access to a private forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and other users. You can access and subscribe to the forum at www.manning.com/OCAJavaSE7ProgrammerICertificationGuide. This page provides information on how to get on the forum once you’re registered, what kind of help is available, and the rules of conduct in the forum.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue among individual readers and between readers and the author can take place. It’s not a commitment to any specific amount of participation on the part of the authors, whose contribution to the book’s forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions, lest her interest stray!

The Author Online forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.