OCP (Oracle Certified Professional) exam is the official test for all Java developers who want to examine their Java programming skills and in-depth understanding of the language. Prior to Java version 11, the exam was split into two different exams: the OCA (Oracle Certified Associate) and the OCP (Oracle Certified Professional) exams, which are now merged into a single, ultimate exam that covers an entire set of topics of the core Java language. The exam has a total of 50 questions, consisting of a mixture of multiple-choice and single-answer questions, and a duration of 90 minutes. It doesn’t require any typing or code writing and the questions are formed mostly as puzzles you need to debug.
I recently went on an endeavor to fully prepare myself and ultimately pass the exam. I chose the OCP exam for Java 17, as it is currently the most recent version of the exam. Since I was able to pass the exam, I have decided to document and share my experiences throughout this process to make it easier for anyone who decides to embark on this journey in the future. The path to achieve this goal is in theory quite simple – read about every topic covered by the exam, write some code for practice, go into details, learn about edge cases of each topic, and in the end pass as many mock exams as possible. Well, the process fits this description, but it drained a little bit more time and energy than one would expect. I started preparing at the beginning of September 2022 and passed the exam by the end of March 2023 which is roughly 7 months in total. Of course, this includes all kinds of breaks, such as holidays, busy work schedules, and other reasons that would drag me off studying. Total time fluctuates between different people, which is completely fine and shouldn’t be a concern as long as there are no longer or complete stops, or even no stops at all – avoid burnout and stay consistent, that’s the key! Without further ado, here are the 3 main steps I followed while studying for the exam:
1. Reading the Study Guide
It’s common for developers to get lost in the spaghetti junction of different sources, forums, and websites, searching for the best read that will fly them through the process and throw them the final product in the shortest possible time. Fortunately, this is not the case with the OCP exam. The best possible way of preparing for the exam is reading about the details of each covered topic, and what better way of doing so than by reading the official OCP study guide, written by authors Scott Selikoff and Jeanne Boyarsky?
For Java 17, OCA and OCP exams are merged into one, meaning that the book also contains the combined topics which would usually be separated into 2 different books, hence the just over 1000-page book. Don’t be discouraged though, as the book is easy to read and carefully explains the details of each topic. The book is separated into 15 chapters, each covering a specific topic or a set of closely related topics, building on previously learned chapters. Despite being already familiar with Java, especially in the earlier topics, I’ve decided not to skip any part of the book to fully immerse myself in it without any shortcuts. If you decide to use shortcuts, that’s perfectly fine. Just make sure you’re not skipping any vital parts of the chapters that would later come to punish you during review questions or mock exams. Each chapter has an average of 70 pages, depending on the scope and complexity of the covered topics, followed by 20-ish review questions. I don’t recommend skipping any of these questions as they are a good introduction to what’s expected in the exams. My initial plan was to keep track of all my answers (both correct and incorrect) and redo the same questions after reading the book but ultimately moved forward to the mock exams as they give you the most real picture of how a real exam can look like. This doesn’t mean you can’t redo the review questions from the book more than once, but you should go through them at least once, especially right after each chapter – they’re great confidence boosters!
In the end, it was all about consistency. I tried to read at least 10 pages every day, sometimes up to 50 pages if I had time. While 10 pages don’t sound like a lot, remember that you’re likely to be reading new information that you need to memorize and fully understand before moving on. To make sense of getting to the end of this long book, I highly recommend setting smaller goals each day, such as reading at least XY pages or reaching a certain number of pages. This step obviously takes the longest to complete and may seem like a never-ending cycle, but by the time you finish the book, you will already have enough knowledge to pass the exam. The only thing that will be missing is practicing questions and writing code to test what you read.
2. Writing and testing code
This is more of a mid-step than an actual main step, as it’s usually combined with reading. If you’re reading about something you’re seeing for the first time, it’s important to understand how it works, not just memorize it. Open your favorite IDE, create a new file, and start putting down everything you’d like to test out. Play around by creating different scenarios and testing how different features blend together. Creating scratch files and scribbling tons of code was what I loved doing. This helped me get a grip on what the sentences from the book actually mean. It’s safe to say there’s never enough testing, but once you’re confident enough with newly obtained knowledge you may proceed to read the book or do the review questions. After that, it’s a repeated cycle until you reach the very end of the book. Finishing the first 2 steps will give you the knowledge and tools that are more than enough to start conquering mock exams, which are the last step before the actual exam.
3. Mock exams
There are many ways to test your knowledge, but the most used is probably the well-established Enthuware software. The application contains many different types of exams, statistical analysis of average scores among candidates, and different kinds of progress reports that keep track of your personal progress. It is also backed by the community of developers and other candidates who joined together to improve the efficiency of Enthuware by updating it with new questions they bumped into during the exam.
Tests are separated by category, which includes Standard, Practice, Objective-wise, and Custom tests. Standard tests mimic the environment of real tests and contain a little bit of everything. Practice tests are created based on question difficulty, each of them getting progressively harder. Objective-wise tests contain questions grouped by topics which is great in case you need more practice in a particular topic. Custom tests allow you to create your own tests based on certain criteria. However, I’ve decided to only go through the Standard section, because the Standard section alone contains 24 different tests once again separated into groups: 4 Foundation tests which test your basic, more theoretical knowledge, followed by 16 standard tests which are usually a bit tougher, and 4 Unique tests with brand new questions which are meant to be done 1 or 2 days before the real exam. The passing requirement for the exam is 68% so scoring less than that on any exam should indicate that you need to go back and reread the chapters you scored the lowest on. In theory, every other exam should increase your percentage but don’t get discouraged if it oscillates more than expected. Sometimes it’s not your day, you’re too tired or the questions are just too tricky. If you keep slipping on questions regarding the same topic repeatedly, you might try out one of the Objective-wise exams to improve your passing rate. Each of these exams is 10 minutes longer and has 5 more questions than the real one. I highly suggest going through each and every question thoroughly after completing the exam to analyze the questions, even the ones you answered correctly. Write down the code, play with the examples, and check the book for further explanation. I would also not recommend going through more than 2 exams per day, as each lasts for 100 minutes, with additional time spent analyzing it afterward. 2 exams can take you about 5 hours to fully process and you will feel drained enough that the 3rd exam may not give you a realistic result.
After going through every exam, I calculated the average score. If your average out of 24 exams is above 68% you should be ready for the real exam and pass it with flying marks. If you score lower than 50% on any of the exams, you should definitely go back and reread certain topics and retake the test.
It’s time for the exam!
Following the above steps is no easy task. It’s very time-consuming and takes a lot of discipline and practice. Motivation goes up and down and that’s completely normal, so don’t get discouraged on your way and give up. Take a break, recharge your batteries, and keep moving. In the end, passing the exam is very rewarding. It proves that reading a single book, writing some code, and passing some mock exams can teach you well enough that you can become a Java professional! This certificate never expires, so you don’t have to worry about your certification becoming obsolete. Java is an established language with a large community, and it won’t go anywhere anytime soon, which, in my opinion, just adds to the value of the certificate!
Of course, feel free to add your own preferences during the process, but following these steps should be your basis. It also might take you much less time than it took me. But don’t rush it, find your own rhythm and stay on course, you’ll get there.
Best of luck!