Jeanne’s experiences taking the 1Z0-816 exam

In May, I took part 1 of the OCP 11 certification (1Z0-815). Today I took part 2. The objectives indicated it was a mix of topics from the OCP 8 and new ones. I passed with 80%. You might be thinking this is low for a cert book author. Do keep in mind that I had to take the exam without a study guide :). And also, that some topics are Scott so he is an expert on those!

How I studied

  • I read the relevant chapters from our OCP 8 book.
  • Did the official practice questions. (It would have been better if these were split between part 1 and part 2). There are only a few
  • Read the secure coding guide from Oracle
  • Read the annotations trail from Oracle
  • Re-read chapters 9 and 10 from Manning’s Java Module System book (I was the Technical Development Editor on this book)
  • Read the java.boot.by guide for the 1Z0–817 exam. (Different exam, but it was a perspective on the new topics)
  • I did some of the practice questions from that book as well. I didn’t do well on these because I did it late at night (I’m a morning person) and I don’t think I retained much.

The morning of the exam, I came across Enthuware’s tips. They also recommended the secure coding guide and annotations trail. They had alternate recommendations for modules and the other topics.

My take on the exam

In some ways, this exam was easier than part 1 (1Z0-815) and in some ways it was harder.

The easier part is because part1 covers a lot of topics like constructors and inheritance that can show up in any question. So you have to constantly be on alert for things that don’t compile for reasons unrelated to the original question. By contrast, part 2 (1Z0-816) is more topic based. So if you see a question on lambdas and streams, it is likely to be about lambda and streams. If you see a question on autoboxing, it is likely to be about autoboxing.

The harder part is because there are a lot of APIs and concepts to memorize. Additionally, you are likely to be unfamiliar with some of them. Most Java developers don’t use the concurrency APIs *and* JDBC * and modules * and … every day.

It took me about 70 minutes to get through all the questions on the first patch which was about the same as part 1.

How I would recommend studying

I still recommend waiting for a study guide to be out. It’s faster to study when you have more easily digestible material. That said, if you need to take this exam before our study guide is out, I recommend:

  1. Buy our OCP 8 book.
  2. Read the secure coding guide from Oracle
  3. Read the annotations trail from Oracle
  4. Read the java.boot.by guide for the 1Z0–817 exam. (Different exam, but it gives another perspective on the new topics)
  5. Read chapters 9 and 10 from Manning’s Java Module System book. Note that Manning allows you to read 5 minutes a day for free. They also have micropurchases so you can just buy the one chapter. You start on the book page and click on the chapter you want to read. After 5 minutes, you are prompted to pay if you want to continue. You get 500 tokens for free.
  6. Do the official practice questions. There are only a few.
  7. Do the Enthuware tests fo morer practice questions.

local variable type inference with instance and static initializers

Local type variable inference is the formal name of “var” in Java. From the name, you might deduce some things about allowed or disallowed locations. For example, a local variable in a method is allowed and an instance variable declaration is not.

Scopes that are even more granular are also allowed such as inside a for loop or try with resources statement.

I learned today that instance and static initializers are allowed as well.

public class LVTI {
public int myValue;
{
var temp = 3;
myValue = temp;
}
}
}

In hindsight, this makes sense. An initializer is a block of code. Which can have local variables.

For more on local variable type inference, please see the official style guidelines.

Choosing an exam: Java Foundations vs OCP 11

Three years ago, I wrote about why you should take the OCA 11 rather than the Java Foundations exam. Now that the Java 11 cert is out, the situation changes.

Java Foundations vs OCA 8 (1Z0-815)

Until the OCA 8 is discontinued, I think everyone considering the Java Foundations exam should take the OCA 8. The reasons in my original blog post still apply:

  • The OCA 8 is not that much more difficult than the Java Foundations exam. It’s definitely in reach for an entry level programmer.
  • Taking the OCA 8 lets you use it as a pre-req for a later exam. You can take either the OCP 8 (IZ0-809) or OCP 11 part 2 (IZ0-816). This means you will only need to take one more exam to become OCP certified.

So when should you take the Java Foundations exam:

  • Cost: The Java Foundations exam costs less than half the price of the OCA 8. If you can’t afford the OCA, this is an option.
  • Requirement: If you took a course that requires the Java Foundations or lets you take it for free.

Java Foundations vs OCP 11 part 1 (1Z0-815)

With Java 11, it’s a harder decision deciding which exam to take because:

  1. The OCP 11 part 1 (1Z0-815) is significantly harder than the OCA 8 (1Z0-808). The OCP 11 part 1 is still in reach of an entry level programmer, but it is more work.
  2. Passing the OCP 11 part 1 does not give you a certification. Another (even harder exam) is needed for that.

So who should you take the Java Foundations exam:

  • Time: If you don’t have the time to study for two harder exams, the Java Foundations exam gets you a certification faster.
  • Cost: The Java Foundations exam costs less than half the price of the OCP 11 part 2 and a quarter the cost of the OCP credential.
  • Requirement: If you took a course that requires the Java Foundations or lets you take it for free.

Just be aware that taking the Java Foundations exam does not serve as a prerequisite to later certification exam. If you plan to get OCP certified in the future, be aware that the Java Foundations exam is a one off.