Tipps and Tricks for the Java SE 8 Programmer Exam

Tipps and Tricks for the Java SE 8 Programmer Exam

Recently i studied for the Java SE 8 Programmer I Exam (Java OCA for short) and was glad that i passed it on the first go. Although i’ve been practicing programming in Java several years, i decided to sustain my practical knowledge with some theoretical background and i’m happy to share my experience in this blog post.

Is it worth, getting the Java OCA 8 certificate?

Although the studying is quite time consuming, i would say “yes”, because of the following reasons:

  1. You learn Java in detail
    Even if you’re a seasoned Java developer, you’ll learn a lot about Java during studying for the exam. You won’t learn much about Design Patterns or anything about third-party Framework (e.g. Spring), but the exam expects you to know about base concepts like immutability, Polymorphism etc. Learning them will help you understand these concept in-depth and also to apply the learned concepts in your daily programming.
    You’ll learn a lot about new Java 8 specific features like Lambda Expressions and Functional Programming, enhancements on Java Interfaces and multiple inheritance (“default” method). Learning these concepts will help you understand existing code written in Java 8 and also to write powerful new program routines using the new techniques.
  2. It’s a nice CV addition which might help you getting that developer job
    Having the OCA Certificate alone will NOT get you any Java Programmer position,there are a lot of other things that make you a good programmer. The certificate might help you getting the job interview or get one foot in the HR door. Imagine an HR Employee having dozens of job applications and has to filter them out. 10 of them have similar education and experience, but only a few of them have recent product certification, who would you consider for a job interview?
    Some job interviewers want to test the knowledge of a candidate by asking detailled stuff about Java. Having the certificate might omit asking these, and if, you’re re able to answer them anyway and in a much more confident manner than simply having googled typical interview questions prior the interview..
    Even if you’re happily employed in a company, the certificate might help your Sales or Project Manager get you projects for high demanding customers. It can be a sales pitch and quality ensurement to tell the customer that only certified programmers will work on that top notch Java based application project..
  3. It helps to keep your mind sharp and learn new things
    As a software developer, we have to learn constantly new technologies, frameworks and other stuff. Being resistent learning new stuff can be fatal for your future career, especially in our fast-changing world. Having the Java 8 Exam as a further bullet point in your CV history will show you new or also existing employer that you keep your knowledge up to date and also that you are eager to learn new things.

Organisational Stuff

Things what you need:

  • Oracle Web Account
    Simply register at Oracle: https://login.oracle.com/mysso/signon.jsp
  • Pearson VUE Web account
    Register at Pearson VUE. This will be a different account than the one you might already have for the IBM certification program. 
  • Link Oracle and Pearson VUE Accounts together
    In order that Pearson VUE knows your oracle account, you have to link them together with the Oracle Testing ID. Simply follow the on screen instruction at the Pearson VUE Account creation.

Be sure you do these steps  BEFORE showing up for the exam!


As all things in this world, the OCA Exam doesn’t come for free. The price in Swiss Francs was CHF 238.–. The easiest way to finally schedule your exam is to create the appointment directly at Pearson VUE, because you can do the payment, choosing the exam site and scheduling in one process right away.
Another possibility would be to get an Oracle voucher and use that in the Pearson VUE exam scheduling. That’s the process i did at first, but found out that it was a mistake, because the price was actually higher due to taxes, also after the payment i got the message, that i’ll have to ways up to 5 working days until i will receive the voucher (!). I did not accept that and immediately cancelled my order and processed the payment and scheduling directly at Pearson VUE, which worked fast and fine. Mind, when you’re company is an Oracle Business partner, it’s worth to check out if you get the vouchers maybe for free? They might have a similar program like IBM Business Partners (You-pass-we-pay).

Things to learn

Now let’s get into the interresting stuff. Let’s see first some facts about the exam:

  • Exam ID: 1Z0-808
  • Total of questions: 77
  • Minimum passing score: 65%
  • Time: 150 Minutes / 2 1/2 hours..

Questions type: Multiple Choice (1 or more, if there are more than 1, the question will tell you exatly how many).

This doesn’t sound hard, but beware, this ain’t be the typical Sales or Notes Developer questions of the IBM Certification Program (when in doubt, always favour for IBM :-). These questions are Java core language questions. They will present you multiple lines of code (occasionally even bad formatted) and ask you about the result of the code, or which exception will be thrown at which line or if the compilation of the code fails altogether..

The detailed Topics are listed on the Oracle Test Info Site.

Study Tipps

There are many learning material resources out there. Some are good, some are soso. I did the following learning approaches (and didn’t regret):

  • Theoretical learning
    I bought myself the OCA Java SE 8 Programmer I Study Guide. This book is very well structured, with many examples and (hard) example questions for each topic.
  • Practice learning
    I consider myself a practice oriented person. So solely reading a book won’t help me much. Instead i did all the examples in the book on my Laptop, changed them, broke them, fixed them until i understand them. I used an Eclipse IDE despite the book and other resources clearly discourage you from using them. I thought using an IDE was ok, since it’s just faster producing the code and modifying existing one.
    Also i used JUnit and Hamcrest Asserts in order to verify the results of my code. There can be a nice side effect too: You’ll learn a lot more about Hamcrest and different asserts too! 
  • Practice and Mock tests
    After each chapter of the book, there is an evaluation test with some 30 questions. These questions are pretty hard! After finishing these, i downloaded the Enthuware mock exam suite and purchased the OCA 8 question set (less than 10 bucks, worth every penny!). They are also pretty hard..
    Do yourself a favour and take these mock exams seriously. Don’t look up every question when you find them difficult. At the end, after the results, look up all of these questions up (even the correct ones), don’t be disappointed when having low scores at first, you’l learn a lot from mistakes..
    For the questions of the book, i recommend answering them on a different sheet of paper or on the laptop, since like that you can retake them after a while.

Java Tipps

When you’re struggling on the same type of questions again and again, you might consider creating you own documentation and your own mnemotechnics. here are some examples:

Substring method

I struggled often solving questions about substring methods defining the start and end index. After using this method, i think of them as “free” questions, meaning i can solve them 100% right:

Consider this simple test:

public void substring() {
	String batman = "batman";
	String result = "";
	result = batman.substring(1, 4);
	assertThat(result, equalTo("atm"));

The test succeeds and as you see in the assert, the result is “atm”.

To solve this (without IDE.. :-), an easy way is to draw the string and indexes of the substring statement in a matrix like this:

The starting point is pretty obvious: all you need to know is that the index starts at 0, not from 1.. But what about the End Index? Is it until the start of the end index or including the end index?

For this case you can do the simple back-check:

end index minus the start index has to be the same like the amount of the resulting characters.

in our case: 4 – 1 is 3.. so the result “atm” is correct….


Another useful remembrance was for remembering behaviours when accessing public variables and calling methods of polymorphed objects.

Consider the following example:

What does the following code print?

class Parent {
	public String name = "variable A";

	public String getAnotherName() {
		return "method A";

class Child extends Parent {
	public String name = "variable B";

	public String getAnotherName() {
		return "method B";
public class ParentChildTester{
	public static void main(String[] args) {
		Parent parent = new Child();

Will the tester class print the variables / methods of the parent class or the Child Class itself?

The result is:

parent.name:variable A
parent.getAnotherName:method B

And you can simply solve any questions of this type by memorizing the following: 

Variables are SHADOWED and methods are OVERRIDDEN:

  • Which variable will be used depends on the class that the variable is declared of.
  • Which method will be used depends on the actual class of the object that is referenced by the variable.    


Other things to remember and learn:

  • Strings are immutable, so you always have to set a variable when make string manipulations (e.g. somestring.replace(“a”, “b”) won’t have any effect, but somestring = somestring.replace(“a”, “b”) has)
  • learn core java arrays and their initialization
  • learn access modifiers (public, protected, default and private)
  • learn behaviour of Garbage Collector on objects
  • Learn anything about primitive types and their autoboxing classes
  • learn about String and StringBuilder methods
  • learn all the loop statements
  • learn about constructors and inheritance (super keyword!)

Well there are a lot more to learn..

I committed my test code and notes into a Github Repository: https://github.com/fdehedin/Preparation-for-the-JavaOCA-Exam. You can simply clone it and import it to your eclipse IDE by using gradle.

Tipps for the actual exam

  • The software actually is a typical certification application you probably know. One nice feature i only accidentely found out is that you can strike out wrong answers by using the right mouse click, this is very helpful..
  • As you might remember from the IBM certification program, you can mark questions and review them at the end. Do that with questions which are hard, or you’re not sure about the answer. Don’t do the mistake tough and mark too many, since you will not have the time to review all of them in-depth..
  • You won’t be allowed to take any type of smartphone, notes or pens with you, but they will provide you with those (if not, ask..).
  • Stay calm and think. You might be nervous at the first few questions, thinking about the difficulty levels will put you under stress. If you experience that, STOP, THINK, ACT. You learned a lot, so focus on the question itself and solve it. If it is too hard to answer right away or you find out that it takes a long time to solve, mark it and leave it to the end..

If you’re planning or consider taking this exam, i wish you good luck. If you have any further questions, you’re very welcome to drop me a message or leave a comment. I’ll be happy to answer as far as i can.

Leave a Reply