INTRODUCTION

Just How Hard Is the OCP Java SE Programmer Exam?

Since you’ve decided to pick this book up, we’re guessing that you’re considering taking the OCP Java SE 6 Programmer exam.

The OCP Java SE Programmer exam is considered one of the hardest in the IT industry, and we can tell you from experience that a large percentage of exam candidates go in to the test unprepared. As programmers, we tend to learn only what we need to complete our current project, given the insane deadlines we’re usually under. But this exam attempts to prove your complete understanding of the Java language, not just the parts of it you’ve become familiar with in your work.

Experience alone will rarely get you through this exam with a passing mark, because even the things you think you know might work just a little different than you imagined. It isn’t enough to be able to get your code to work correctly; you must understand the core fundamentals in a deep way, and with enough breadth to cover virtually anything that could crop up in the course of using the language.

What this Book Is (and Is Not)

As we’ll discuss again in Chapter 4, most successful candidates do three things:

Image Study with a good study guide

Image Take a lot of mock exams

Image Write a lot of code

This book focuses on the last two items of the preceding list. It is NOT a study guide. If you haven’t worked with a good study guide, and you find that you’re scoring well on the practice exams in this book, count yourself unusual. Our experience, working with thousands of candidates, is that taking mock exams alone isn’t enough to pass this exam. (Our main goal with this book is to supplement our study guide.)

The basic study plan we recommend is that you do a lot of reading and coding before taking the four full mock exams in this book.

How to Use this Book’s Six Exams

This book begins with two short (14-question) assessment exams. These exams are meant to help you determine whether you’ve done enough preparation to tackle the book’s remaining four full exams.

After the two assessment exams comes the first full (60-question) practice exam. After that, you’ll find a short chapter that will give you some tips and ideas for coding exercises you can do to further your studies.

Finally, three more full 60-question practice exams are included. We recommend that after each exam you document the areas where you still need work, and do some more preparation before the next exam.

Study Tips

First and foremost, give yourself plenty of time to study. Java is a complex programming language, and you can’t expect to cram what you need to know into a single study session. It is a field best learned over time, by studying a subject and then applying your knowledge. Build yourself a study schedule and stick to it, but be reasonable about the pressure you put on yourself, especially if you’re studying in addition to your regular duties at work.

One easy technique to use in studying for certification exams is the 15-minutes-per-day effort. Simply study for a minimum of 15 minutes every day. It is a small but significant commitment. If you have a day where you just can’t focus, then give up after 15 minutes. If you have a day where it flows completely for you, study longer. As long as you have more of the “flow days,” your chances of succeeding are excellent.

We strongly recommend you use flash cards when preparing for the Programmer’s exam. A flash card is simply a 3 × 5 or 4 × 6 index card with a question on the front, and the answer on the back. You construct these cards yourself as you go through a chapter, capturing any topic you think might need more memorization or practice time. You can drill yourself with them by reading the question, thinking through the answer, and then turning the card over to see if you’re correct. Or you can get another person to help you by holding up the card with the question facing you, and then verifying your answer. Most of our students have found these to be tremendously helpful, especially because they’re so portable that while you’re in study mode, you can take them everywhere. Best not to use them while driving, though, except at red lights. We’ve taken ours everywhere—the doctor’s office, restaurants, theaters, you name it.

Certification study groups are another excellent resource, and you won’t find a larger or more willing community than on the JavaRanch.com Big Moose Saloon certification forums. If you have a question from this book, or any other mock exam question you may have stumbled upon, posting a question in a certification forum will get you an answer, in nearly all cases, within a day—usually, within a few hours. You’ll find us (the authors) there several times a week, helping those just starting out on their exam preparation journey. (You won’t actually think of it as anything as pleasant-sounding as a “journey” by the time you’re ready to take the exam.)

Finally, we recommend that you write a lot of little Java programs! During the course of writing this book, we wrote hundreds of small programs, and if you listen to what the most successful candidates say (you know, those guys who got 98 percent), they almost always report that they wrote a lot of code.

Exam Taking Tips

As much as possible, we’ve tried to structure the questions in this book to match the “look and feel,” the complexity, and the level of detail of the questions on the real exam. The following are a collection of fun facts relating to the real exam, and the practice exams in this book that should also help you feel like you’re in familiar territory when you sit down to take the actual exam at a test center.

The Constraints of Worldwide Consistency

One of the great things about the OCP Java SE Programmer certification is that it’s recognized globally. In order to achieve such recognition, the test centers throughout the world are as standardized as possible. While this is great from the perspective of fairness, it does impose some constraints:

Image The test engine must run on the lowest common denominator hardware.

Image The exam’s question formats must be universally supported.

What this means to you is that the code samples you’ll be analyzing are often poorly formatted (so that you can see a lot of code in a small space), or that you’ll have to do a lot of scrolling up and down to see all the code for a given question. The questions in this book are formatted to emulate what you’ll encounter at your actual test center.

Question Formats

The OCP Java SE Programmer exam has two styles of questions: Multiple Choice and Drag and Drop. Regardless of format, there is no partial credit for a given question. If you get most, but not all, of a question correct, you get zero credit for that question.

Multiple Choice For each question, a scenario (often including some Java code) will be presented, followed by a list of possible answers. On the real exam, you will ALWAYS be told how many correct answers to choose. In this book, we often say: “Choose all that apply.” We want to make it a bit tougher for you.

These exams typically number the lines of code in a question. When a code listing starts with line 1, it means you’re looking at an entire source file. If a code listing starts at a line number greater than 1, that means you’re looking at a partial source file. When looking at a partial source file, assume that the code you can’t see is correct. (For instance, unless explicitly stated, you can assume that a partial source file will have the correct import and package statements.)

Drag and Drop On the real exam, you should expect that about 20–25 percent of the questions you encounter will be drag-and-drop style. This book includes eight simulated drag-and-drop questions—enough to give you a rough idea of what you’ll encounter on the real exam. Drag-and-drop questions typically consist of three components:

Image A scenario A short description of the task you are meant to complete.

Image A partially completed task A code listing, a table, or a directory tree. The partially completed task will contain empty slots, which are indicated with (typically yellow) boxes. These boxes need to be filled to complete the task.

Image A set of possible “fragment” answers You will click fragments (typically blue boxes) and drag and drop them into the correct empty slots. The question’s scenario will tell you whether you can reuse fragments.

Most drag-and-drop questions will have anywhere from 4 to 10 empty slots to fill, and typically a few more fragments than are needed (usually some fragments are left unused). Drag-and-drop questions are often the most complex on the exam, and the number of possible answer combinations makes them almost impossible to guess.

Time Management

The real exam has 60 questions (the same for the four full practice exams in this book). You need 35 correct questions to pass. (The online web site for the OCP Java SE Programmer exam states this, not too helpfully, as 58.33 percent.) As of this writing, you will be given three hours to complete the exam (three minutes per question), which should be more than enough time. Always check with the exam center before taking your exam because this information is subject to change.

You are allowed to answer questions in any order, and you can go back and check your answers after you’ve gone through the test. There are no penalties for wrong answers, so it’s better to at least attempt an answer than to not give one at all.

A good strategy for taking the exam is to go through it once and answer all the questions that come to you quickly. You can then go back and do the others. Answering one question might jog your memory for how to answer a previous one.

The real exam is presented in full screen, with a single question per screen. Navigation buttons allow you to move forward and backward between questions. In the upper-right corner of the screen, counters show the number of questions and the time remaining. Most important, there is a Mark check box in the upper-left corner of the screen—this will prove to be a critical tool, as explained next.

As you’re taking the exam, if you’re not entirely confident in your answer to a question, answer it anyway, but check the Mark box to flag it for later review. In the event that you run out of time, at least you’ve provided a “first guess” answer, rather than leaving it blank.

Second, go back through the entire test, using the insight you gained from the first go-through. For example, if the entire test looks difficult, you’ll know better than to spend more than a minute or two on each question. Create a pacing with small milestones—for example, “I need to answer 10 questions every 25 minutes.”

At this stage, it’s probably a good idea to skip past the time-consuming questions, marking them for the next pass. Try to finish this phase before you’re 50–60 percent through the testing time.

Third, go back through all the questions you marked for review, using the Review Marked button in the question review screen. This step includes taking a second look at all the questions you were unsure of in previous passes, as well as tackling the time-consuming ones you deferred until now. Chisel away at this group of questions until you’ve answered them all.

If you’re more comfortable with a previously marked question, unmark the Review Marked button now. Otherwise, leave it marked. Work your way through the time-consuming questions now, especially those requiring manual calculations. Unmark them when you’re satisfied with the answer.

By the end of this step, you’ve answered every question in the test, despite having reservations about some of your answers. If you run out of time in the next step, at least you won’t lose points for lack of an answer. You’re in great shape if you still have 10–20 percent of your time remaining.

Technical Tips

Be very careful reading the code examples. Check for syntax errors first: count curly braces, semicolons, and parentheses, and then make sure there are as many left ones as right ones. Look for capitalization errors and other such syntax problems before trying to figure out what the code does.

Many of the questions on the exam will hinge on subtleties of syntax. You will need to have a thorough knowledge of the Java language in order to succeed.

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

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