Announcing the OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide

Jeanne and I are pleased to announce the upcoming release of our Oracle Certified Associate Java 8 Study Guide for the Java SE 8 Oracle Programmer I exam! We have been working with Wiley Publishing for the past year to bring this book to light, and are thrilled to announce it is nearing completion. Our goal was create a book that is engaging and fun for new and veteran developers alike. The book covers all of the new features that you are required to know for the OCA 8 exam including: the Local Date/Time API, the Period class, lambda expressions, and more. And of course, it covers the “old” topics as well.

scott-and-jeanne
The book, to be tentatively titled OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z1-808, will be available for purchase later this year on Amazon.com and wherever books are sold.

Oracle has already published a beta version of the Java SE 8 Programmer I exam, with the official version to be available in the coming months.

Please visit our new OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide page for the latest information about the book. If you have any questions for us, feel free to post in the OCA forum at CodeRanch, which Jeanne and Scott visit frequently.

jeanne’s oca/ocajp java programmer I experiences

Today I passed the Java SE 7 Programmer I with a score of 98% which makes me a “Oracle Certified Associate, Java SE 7 Programmer“. (see other post for Java 8 exam)

Deciding to take the test

If you’ve been following this blog, you may know that I’ve been a Java developer.  (tech lead and architect count if you still code <smile>).  Last year I took the SCEA and Core Spring certs.  So why go back and take the “entry level cert.”  I’ve thought about taking the SCJP twice.   My thought process to finally getting here:

  1. Bert Bates mailed me a free copy of K&B version 5 so I could help spot plagiarism of questions on BlackBeltFactory years ago.  I read the book then.  I learned a lot.  I scored poorly on the sample questions because I didn’t take any time to memorize the  relevant information.  And I didn’t care to spend the time learning obscure details.
  2. In 2009, there were rumors of the Programmer Plus exam.  If that exam existed, I wanted to take the beta of it because it sounded *so cool.*  I re-read K&B version 5 and actually studied APIs.  The programmer plus never came to be and I wasn’t motivated to take the traditional SCJP.
  3. A year or two ago, I was one of the cadre of JavaRanch moderators providing technical review of the K&B SCJP 6 mock exam book.  Reviewing that book actually made me less likely to want to take the test because I read it questions about obscure details.  (It did make me interested in doing technical reviews of future books though.  I actually did one for a yet to be printed Manning book – The Well Grounded Java Developer.)
  4. When I noticed the Java 7 OCJPJP had JDBC and NIO sections, that got me interested again.  JDBC is one of my favorite topics and I moderated the CodeRanch JDBC forum for many years with Scott Selikoff.  The beta of part 2 was only $50 so I decided to take it.  I decided to take it on 4/19 and took the beta on 5/9.  I’ll be blogging about this separately in the next week or two.  While I don’t have the score yet, I think I either passed or came really close.  If I fail, I’ll pay full price to take it again.  I’m never going to be more prepared for it than I am right now and don’t want to learn obscure details again!  Once I realized this, I needed to take part 1 of the Java Programmer exam to actually get certified.

My study plan

In all fairness, most of the studying went on before I decided to take either exam.  Both by reading/reviewing the SCJP books and by just picking things up over the years.  I had a week and a day between part 2 of the exam and this part (part 1).  For two of those days, I didn’t do anything at all.    What I did the rest of the time:

  • re-read chapters 1-5 along with parts of chapters 6, 7 and 10 of K&B SCJP which Bert recommended
  • take all 6 mock exams from Enthuware JA +V7

How were the resources I tried

  1. K&B version 5 – Granted you’d buy version 6 at this point.  (or the OCA/OCP 7 version once it is out).  If you plan to take the OCP afterwards, I recommend going with this book to study.  If you just want to take the OCA, it is overkill as the information you need is mixed up with lots of harder information you don’t know.
  2. K&B SCJP 6 mock exam book – If you are planning to take the OCP afterwards and don’t mind the material being mixed together, this is a great resource.  If you want to get your OCA first without being exposed to the OCP information, it isn’t helpful though.  Also, some of the content is no longer on the exam so you have to ignore these parts.
  3. Enthuware JA +V7 – This was a great resource.  It was more difficult than the exam, but not overwhelmingly so.  The only topic that stood out as being on the mock and not needing to know was the ranges that primitive objects could hold.  A free 14 question trial is available so you can see what it is like before committing the $10.  Yes, you read that right.  You get 6 full length mock exams, analysis on your weak areas and the ability to retake questions by subject – all for ten bucks.  Even though there aren’t drag and drop questions, the mock exam still includes them because they are harder.  It also includes one or two fill in the blank questions.  (I found this to be practically impossible as a one character typo marks it wrong and then it is hard to compare to see why you were wrong.  But it isn’t frequent.)  The mock has been updated for Java 7 and the new objectives/difficulty.  I was highly satisfied with it. [My scores were 78%, 82%, 82%, 83%, 80% and 88%]
If you only have one resource, I would pick the Enthuware mock exams.

My impressions of the exam

  • Just like on the SCEA, I had a ton of time.  I had an hour left after taking all the questions and carefully reviewing them.  (I found one wrong answer on review.)
  • Unlike the SCEA, the questions are designed to be tricky/subtle.
  • It was similar to the Enthuware mocks in terms of facts/skills you had to know and format.  The Enthuware questions used some of the same variable names, class names and structures.  Kind of like the SCJP talks about horses.
  • I really like how the exam uses incredibly similar looking questions to ask different concepts.  Even within the same exam.  This prevents you from remembering much of use or memorizing much in advance.
  • A few questions had you flipping between the “exhibit” class and the question.  This was annoying because if you are looking for subtle details, it is a lot to remember between flips or *a lot* of flips.
  • While taking the mock exams, I found a technique that helped me limit stupid errors.  My score jumped 8-10% of the last mock I took (the only one using that technique) and then again on the actual exam.  On the mocks, I went too fast because the questions appeared easy.  On the final mock and real exam, I subvocalized as I read the code for *all* code questions.  This prevented my brain from going too fast and missing anything.
  • When you get your score report, it tells you which objectives you missed questions in.  Mine was “flow control” which tells me I made a stupid error in that space.

And finally, why you should visit a testing center in advance

Note: the testing center fixed the problems I had – see comment below this post for updates

I took the SCEA and Java Programmer part 2 exams at my local testing center which I am happy with. They provide you with pen/paper and a detached room from the office to take the exam.  The only distraction is if there is another person in the room with you and he/she stops and starts at a different time.  They take care to be quiet.

Then there was the center I was at today.  They gave me a *one sided* erasable markerboard to write on.  But that’s within their rights.  If you want paper, you should call and ask.  The exam was held in what looked like a closet.  A small table with two computers and poor ventilation.  It was hot!  And no soundproofing.  I heard everyone who walked into the office while I was there.  Which included an irate customer who had computer troubles and was dissatisfied with the speed at which they were fixing it (this went on for 10 minutes) and another potential customer who was inquiring about training. It was loud enough that I had to hold my ears to think.  Which doesn’t go well with using a mouse to select answers or trace code on paper.

I wanted to take the exam today because I was off work today.  And I figured minimizing the time between part 2 and part 1 would give me less time to get out of the habit of looking for details in exam questions.  It was the right decision.  But I wouldn’t recommend “Horizon Technical Consultants of Flushing” as a testing center for anyone.

java 7 from the nyjavasig

Google java 7 a bug’s life – for approach to bug

Java 7 has come a long way since the Java road show 14 months ago when I blogged about what may or may not be in Java 7. And not always forwards. Oracle sent Donald Smith (director of project management with some coding knowledge) to the NY Java Sig.  In this blog entry, we’ll look at what features made it in, the strategy discussion from Oracle and then some details.

How does Java 7 shape up compared to the road show?

Before we get to what actually happened at the sig, let’s see how Java 7 shaped up compared to the road show.

Category Feature How to Use or Status
Modularity Project Jigsaw Java 8 – modularize the JDK to address the “Java is too big” problem.  Will not replace OSGi.
Multi-lingual Support DaVinci Machine Includes invokedynamic and more. See docs
invokeDynamic Implemented in virtual machine/bytecode to make dynamic languages faster. Invokevirtual was closest but slow because doing extra type checking. Builds CallSite so only does that extra work once and improves performance of subsequent calls. JRuby noted 20% perfromance increase.
Small languages changes (Project Coin) Diamond Operator List>Map<String, Integer> list = new ArrayList<>();
Integer Literals int num = 1_234_567;
Try Catch With Resources try (InputStream s = …) {  … }
Collection literals (like associative array) Didn’t go anywhere. Haven’t seen talked about for Java 8 either.
Other While other (undetermined) features weren’t publicized last year, they will be part of Java 8.
Performance Fork Join New APIs in Java 7.  See end of post for details.
ParallelIntArray Not in Java 7. Didn’t go anywhere.
Closures Closures/Lambda Expressions Deferred to Java 8.  Will include support for multi-core.

High Level/Strategy

Donald didn’t sound like a typical Oracle speaker. He was funny, easy to relate to and started out by talking about his biases/background It felt more personal than corporate. Usualy when Oracle prents something it sounds like legal reviewed it and stripped out a lot. The slide deck did have the standard nine line Oracle disclaimer. He did note that IBM’s Sarbanes Oxley disclaimer is twice as long as Oracle’s. People asked tough questions and he answered honestly when not knowing the answer.

Interesting things from Strategy and Q&A

  1. Timelines
    • Java 6 came out in 2006.  The four years to Java 7 was the longest time between releases anywhere.
    • Java 7 update 1 is due out in early September and will contain the major bug fixes.
    • Java 7 update 2 is due out in October and will contain garbage collection enhancements.
    • Java 8 is targeting 2012.  The speaker thinks 18 months is too soon for Java 8 because the industry is no longer used to a 2 year release cycle anymore, let alone more frequent..  He thinks we need time for the tooling to catch up.
  2. Java heath (just Java; doesn’t include JVM languages)
  3. Official terms for past are “legacy sun employee” or “legacy bea employee”.
  4. HotSpot vs JRockit
    • Survey says 70% use Sun JDK and only 5% use JRockit.
    • Oracle decided to officially kill the JRockit JVM and just use the JRockit tooling. (Mission Control, Flight Recorder and RT)
    • Over time, the two will merge with the JRockit tools being premium features.
    • Oracle emphasized performance will also be free and part of the main JDK.
    • Googlefight between the two shows Hotspot as the clear winner.
  5. JavaOne – Oracle is holding back announcements for JavaOne.  Expect some on
    • Java 7 Certifications
    • Something about the Mac.  Maybe with respect to Java 8.  (Oracle claims the delay in Java 7 on the Mac is to “make things right” with the Apple UI.)
    • Recognition that Oracle needs to clean up their name in community by announcing things at JavaOne and doing them without surprises.
  6. Open jdk is slowly becoming more open. For example, Oracle recognizes the need to open bugs to public before Oracle sees/runs triage. Looking at using jira for this.
  7. Java 7 theme is “moving Java forward.”  In other words, just get something out without waiting for all the features.

More on Java 7

The emphasis was the need to be careful about protecting the platform, the amount of work in the smallest of changes and the desire to not change the type system.  Changes fall into three categories:

  1. Language changes
    • All project coin changes noted in table up top
    • + Allowing Strings in the switch statement
    • + @SafeVarargs allowing the method itself to declare safety so all callers don’t have to suppress warnings.
    • + AutoClosable interface for I/O and JDBC 4.1 resources.  Using these within the try with resources syntax in the table above means they will get automatically closed.  It also means exceptions thrown in that auto generated finally will be suppressed but still available in the stack trace.
    • + Catching multiple unrelated exceptions catch(ExceptionType1 | ExceptionType2 e)
  2. Library changes
    • NIO – Better exceptions, more extensible to different file systems, rename behavior more consistent , more access to metadata
      • Path is the replacement for File. It understands symbolic links cross platform consistently and provides many methods.
      • Lots of methods to create/navigate/transform paths
      • Can call path.toFile() to get file from path to call old apis
      • Paths helper class to get path
      • Files helper class to copy files with lots of options such as copy with attributes or replacing exisiting attributes.  Also supports atomic move.
    • Concurrency (Fork/Join)
      • Phaser class which is similar to the cyclic barrier and countdown latch but has better synchronization and deadlock protection.  Can also add and remove threads on fly.
      • TransferQueue interface which is implmented by LinkedTransferQueue – the producer or consumer can block while waiting so dont get too far ahead
      • The key class to implement your logic in should implement RecursiveTask.  It is like RecursiveAction except that it returns a result.  All you have to do is implement the compute() method.
      • The ForkJoinPool is the executor so you can submit your task to have it run.  Methods are provided to see if it is done and get the result.  By default it uses the # available processors or you can specify explicitly.
  3. Runtime changes
    • See table up top for changes.
    • Oracle listed all the languages that can run on a JVM.  They noted that some are research projects by students and not “real” or “ready.”  I laughed because C# was on the list.  Why would you want to run C# on a JRE?
  4. Other
    • Swing nimbus look and feel is completed.  Metal is still the default.
    • Eliptic curve cryptography
    • Deadlock avoidance in classloader
    • Close method for UrlClassloader
    • Javadoc now has support for CSS.  Which means the JavaDoc now has “nice looking annoying frames”