My Experience taking the new Java SE 11 Programmer I 1Z0-815 Exam

One day after Oracle announced the new Oracle Certified Professional: Java 11 Developer certification, I decided to jump in and take the first of two exams! As an author of a best-selling Java certification series, how hard could it be I thought? In short… very! I did pass, but it was very different from what I imagined it would be.

Certification Changes

On the surface, the new Java 11 Programmer I (1Z0-815) and Java 11 Programmer II (1Z0-816) exams appear to be loosely based on the original OCA 8 (1Z0-808) and OCP 8 (1Z0-809) exams. I say loosely, because glancing at the objectives would lead you to believe they might be the same exams. They are decidedly not! More on that in a minute. One major change to the structure, though, is that the Oracle Certified Associate title no longer exists. Completing either exam does not grant you any certification title, and you must complete both Programmer I and Programmer II exams (in any order) to be an Oracle Certified Professional 11. There is also a single Java 11 OCP Upgrade (1Z0-817) exam for holders of a Java 6/7/8 OCP certification. Each of the three new exams are listed at $245 US. Unlike previous Java exams, there is no discounted beta exam, or beta exam of any kind, for the new Java SE 11 exams.

Neither Jeanne nor I have taken the Programmer II exam yet, so the rest of this post will be about my personal experience with the new Programmer I exam.

OCA 8 (1Z0-808) vs Java 11 Programmer I (1Z0-815): What’s the difference?

A LOT. I can’t emphasize this enough. The new Programmer I exam is significantly harder than the OCA 8 exam was. Questions are much more involved, much longer, and often require answering multi-part questions. For example, a question might have 8 answer choices and you need to select 3 completely independent answers. Process of elimination is crucial to finishing the exam. For example, in some cases it’s a lot easier to find the 5 choices that don’t compile than the 3 that do.

The new Java 11 Programmer I exam also includes a lot of topics that were previously only found on the OCP 8 exam. While you don’t need to know stand-alone topics like Concurrency, JDBC, and NIO.2 for this exam, you do need to know nearly everything there is to know about core Java topics like interfaces, generics, and Java operators. Jeanne and I noticed the new objectives appear to be a lot vaguer and broader than the previous objective set, meaning they can (and do) encompass a lot more than is explicitly listed in the objective titles. For example, == and equals() are no longer listed in the objectives, but don’t let that lull you into thinking for a second that you don’t need to know them to pass the exam!

Modules, modules, modules, Oh my!

The Java 11 Programmer I exam includes new topics like Project Jigsaw modules. Prior to taking the exam, I thought there going were only going to be a handful of questions on modules. Boy was I wrong! There were many questions on modules and the depth of them was honestly very surprising. You definitely need to memorize all module-related command line arguments to java/javac/jdeps/jmod, as well as knowing the long and short command-line flags. Just because modules is 1 of the 12 of the top-level exam objectives, don’t be fooled into thinking only 1/12 of the questions will be on modules! Understanding modules is vital to passing this exam!

OCA 8 (1Z0-808) vs Java 11 Programmer I (1Z0-815): What’s the same?

Excluding modules, the objectives are quite similar between the OCA 8 and Java 11 Programmer I exams, but that’s more likely to do more harm than good. Anyone going into this exam thinking this is just a Java 11 version of the OCA 8 exam will be in for a surprise.

So what is the Java 11 Programmer (1Z0-815) exam?

In a nutshell, it’s like they took the old OCA 8 exam, increased the difficulty of the questions by an order of magnitude until it was as hard as the old OCP 8 exam. Then, they updated the length of questions so that you had to answer 2-3 questions at once in a single question. Next, they greatly increased the depth of any topic on the previous exam. For example, previously you might have only needed to know 2-3 StringBuilder methods, whereas now you need to know nearly all of them. Finally, they filled the exam to the brim with Java module questions.

Of course, they also included other new Java 9/10/11 topics, like var and some string/array methods, but they pale in comparison with the changes in depth, difficultly, and new module topics.

“Can I use your OCA 8 book to study for the Java 11 Programmer I exam?”

As the sole source of preparation for the exam, definitely not. The OCA 8 exam was significantly easier and lighter than the new Java 11 Programmer I exam, and we wrote the questions and topics to match that particular exam. If you only study from our previous book, there is a good chance you might fail the exam.

That said, you could use our OCA 8 book, as well as the first half of our OCP 8 book as a starting points for studying for the new Java 11 Programmer I exam, but you will absolutely need to supplement it with education on the new topics, methods, and classes in Java 9/10/11, as well as in depth and hands on knowledge of modules. You should also expect the questions to be at least on the level of difficulty as the OCP exam.

“Hey Scott and Jeanne, is there a new Java 11 certification book coming?”

We get this question a lot, even before the objectives were announced. All I can say is, stay tuned for now!

DevNexus 2019 – Alternatives to Java Reflection and Unsafe Usage – Chandra Guntur

See the table of contents for my other blog posts from the conference

This presentation is a lot of live coding with this kata.

JSR 292

  • Multi Language VM proposed in 2016
  • Code named Da Vinci Machine project
  • Gained ability to change classes and methods at runtime

Issues with reflection

  • Performance overhead
  • Security restrictions
  • Exposes internals – breaks abstractions and encapsulation

Method handle

  • Goal is to make as fast as a statically linked Java call
  • Mainly same since Java 7
  • More verbose than reflection
  • Performance benefit because only checks accessibility the first time you use it
  • Main APIs:
    • MethodHandles.Lookup – searches for a method handle
    • MethodHandle – execution logic
    • MethodType – represents return type and input parameters of a method. Immutable

Katas

  • Call constructor using a method handle
    • MethodHandles.publicLookup() – gives a loop reference
    • MethodType.methodType(void.class) – constructors don’t have return types so void
    • lookup.findConstructor(DemoClass.class, methodType) – actually get the MethodHandle
    • handle.invokeExact() – invoke method (well, constructor) with no parameters. Need to cast result so correct type.
  • Pass in parameters
    • handle.invokeExact(“paramValue”) – note that the parameters are bound at runtime. If call with wrong params, get runtime exception
  • Call a public method
    • MethodType.methodType(String.class, String.class) – a method that takes a string and returns a string
    • lookup.findVirtual(DemoClass.class, “methodName”, methodType) – call public method with findVirtual
    • handle.invoke(demoClass, “param”)
  • Call a private method (protected and package private work the same way)
    • DemoClass.class.getDeclaredMethod(“name”, String.class)
    • privateMethod.setAccessible(true) – just like with reflection
    • lookup.unreflect(method) – creates lightweight version
    • handle.invoke(demoClass, “param”)

VarHandle

  • Unsafe still deprecated (but not removed) in Java 12
  • VarHandle replaces Unsafe in many cases
  • Standard replacement for some features for atomic concurrency and Unsafe
  • Can use to access field/array index elements
  • Memory fences for fine grained control of memory ordering
  • A strong readability fence
  • Improves safety – requires content types to match/be castable. Also requires array indexes to exist
  • Improves integrity – Follows field access rules including honoring final
  • Performance equivalent to Unsafe
  • API more usable than Unsafe because intended to be an API
  • Uses coordinates since fields are referenced by name.

My take

I like reflection so this was a good opportunity to learn about it’s “successor”. I enjoyed seeing the live coding. In addition to Method Handles code, it was nice to see the callouts to some IntelliJ features. Chandra did a kata on VarHandles. I didn’t take notes on that since I was reviewing my presentation which is next.

DevNexus 2019 – java things that make you go huh – Bob Paulin and Freddy Guime

See the table of contents for my other blog posts from the conference

Scene 5 – singleton makes spring factory return same object each time

Scene 6 – multi release – showed exploring a jar and the alternate files. Which shows a jar can have different behavior. Nice demo of a new way to shoot yourself in the foot!

My take

I misssed 2/3 of the session. I like that each scene stood alone so I could enjoy those parts. And enjoy I did. Their costumes and characters were awesome!