Monday, November 24, 2008

SCJP 6 Upgrade Exam (310-056)

by Fábio Souza

Guys and girls,

I guess the best way to start this post is with my appologies. I really wanted to post it earlier, but you all know how things are =P.

It has been almost three months from when I took the SCJP 6 upgrade exam (310-056). The exam follows the same SCJP 5's (310-055) difficulty level where it's needed to pay attention to every detail. There is time enough to do everything calmly but the tricks are there like they were in SCJP 5. The "secret" is still the same: MAKE LOTS OF EXERCISES. In my case, my knowledge on 310-055 was pretty sharp and I just had to work out the new features of Java 6. Lets talk about the exam and how to go for it.

PS: To get your knowledge on 310-055 "pretty sharp", I recommend my previous post: SCJP5 and 6

Technical information:
  • Number of Questions: 48
  • Score needed: 66% (32 of 48 questions)
  • Time limit: 150 minutes

Resource material:

For those who don't have (or want to have) specific SCJP 6 material (the same of the previous post):

For those who want to buy new material:
* I've never read this book but if the quality is the same of the previous version, there is no doubt it should work.

I made an abstract to help me with the SCJP 6 content by comparing the requisites for both exams (310-055 and 310-065), and studying the Java 6 new features. Here it is:

- Ordered and Sorted comparison:

Click me

- NavigableSet and NavigableMap methods comparison:

Click me

- Other things:
  • Deque: in this interface's javadoc there is a full explanation about the different methods that can be used to add/remover an object of this queue. Be sure that you know the ones that returns an special value (generally null) or that throws an exception instead, when something goes wrong.

  • ArrayDeque: the best (fastest) way to make FIFO and LIFO queues. This is also the recommended implementation when we need a Stack.

  • LinkedList: choose this implementation when objects should be added/removed between the first and the last element.

  • java.util.Collections: there are two new methods in this class, newSetFromMap and asLifoQueue, learn them.

  • java.util.Arrays: avoid System.arraycopy, use the new methods Arrays.copyOf or Arrays.copyOfRange instead.

  • getFreeSpace, getTotalSpace, setExecutable, setWritable, setReadable. These are new methods to learn.

  • there are new constructors that enable exception chaining IOException(String,
    and IOException(Throwable).

  • this is a new class and its instance should be got using System.console. I think all of its methods are importants, take a look at the javadoc. Pay attention to the Console.readPassword, it will fill an array with the provided password, it is a good think to know how to clean this array. This is a good way: java.util.Arrays.fill(src, '\0') and this is a valid and bizarre way: java.util.Arrays.fill(src, 0, src.length, (char)0).
SCJP 6 - To do or not to do

Because the difference between Java 5 and Java 6 is very little, in my opinion, people who already have the SCJP 5 don't need to worry about SCJP 6. For those who don't have SCJP 5 or any SCJP certificate at all: DON'T DO the Java 5 exam; GO STRAIGHT to Java 6.
In my exam (just to freeze: 310-056), the Java 6 content was kind of ridiculous. Only THREE specific questions. It means (this is not an advice) I could take the SCJP 6 exam without any knowledge about its specific content. I'll tell you how it was like:
  • A question about its usage. It was necessary to know how to get the Console instance and how to get typed lines.

  • java.util.NavigableSet and the implementation java.util.TreeSet: The question was about how to use them focusing the method subset.

  • Chosing the best Collection implementation: I don't remember exactly what was asked, but keep this in mind:

    • Stack or queue needed: use ArrayDeque.

    • Removing/Adding elements that might not be at the top or at the bottom: LinkedList.

    • Sorted Collection (unique elements): TreeSet.
That is all folks! Please send your comments, corrections and share your own experiences.


Unknown said...

Thanks for your post!

Nitpick: your entry refers to the 310-056 exam, but the SCJP6 upgrade exam is actually 310-066.

AR said...

I have a question regarding the upgrade exam. If I take an upgrade exam will get a new SCJP 6 certificate and a new score or will I just get something like "Passed upgrade exam scjp xyz"

Also, I passed my scjp 5 exam with 73% only is there a way to improve that score by giving the exam again.

Unknown said...

It's all new AR. new certificate and new score.

AR said...

Thanks a lot Eduardo.