RSS Feed Subscribe to RSS Feed

 

SCJP

If you are a Java developer, you have probably written code like:

System.out.println(“Hello World”);

thousands of times, but do you know what the ‘out’ part actually is? (answer: System.out is a static instance of java.io.PrintStream)

Do you know what the <T> in

public <T> void makeList(T t)

means? (answer: declaring that you are going to be using a generic (as yet unknown) type and using “T” to represent that type).

Studying for the SCJP exam forces you to brush up on such topics.

I recently passed my Sun Certified Java Programmer for Java 6 exam. I’ve actually done it before (for v1.2) as well as the Sun Certified Enterprise Architect Exam, but thought it was time for a refresher, as well as forcing myself to learn the new Java 5 and Java 6 functionality I hadn’t got to grips with yet.

While I’m certainly glad to have passed it, and it will definitely help in upcoming interviews, I think this is the last time I will take it. The effort required is pretty big and a lot of the material covered is something you’d simply check the Java API docs for in your day to day work. But again, good to have done it and it forced me to learn some of the topics I hadn’t been paying enough attention to including Generics, Enumerations and Assertions, as well as reviewing older material such as threads and inner classes.

Also it never does any harm to go over the basics of encapsulation, polymorphism, inheritance and coupling/cohesion.

The Good

The exam has good coverage of generics, collections and inner classes as well as good, if basic, coverage of threads. I was also pleased to see the Sun have removed questions on Bitwise Operators (Bitwise operators compare two variables bit by bit and return a variable who bits have been set based on ANDing or ORing the bits). It is a very obscure part of the Java language and I think right to be removed. There is also comprehensive coverage of all the basic Java constructs including conditional and looping statements, flow control and exceptions etc. Some of it is too detailed for sure, but then again it is good to learn things like:

  • Declared but uninitialised instance (i.e. member) variables gets assigned default values (e.g. 0 for ints, null for Objects)
  • Uninitialised method variables don’t get assigned default values
  • Array elements always get created with default values

It is definitely useful to know this stuff (although better again to just always initialise your variables!)

The Bad

Although the exam is billed as Java 6, it focuses heavily on pre Java 6 (and indeed pre Java 5) material. For example, there is no coverage of Java 5’s java.util.concurrency or annotations and the only few small things from Java 6 that seem to have been added were Console, NavigableSet and NavigableMap. But I guess there is only so much you can put on the exam (see my Java 6 page for more details on what was actually included).

The Ugly

As I mentioned already, I think some of the topics are much to detailed and focused on syntax and API knowledge that any decent compiler, or the Java API docs, can tell you very quickly and easily. You are also forced to learn what is legal in Java, even if it is ugly. You learn stuff that you can do, but never should e.g. declaring an array like

int [] intArray []; //legal but ugly

or the fact that you can assign an int to a char, such as

char ch = (char) -98; //ridiculous but legal

Summary

Is the SCJP worth doing? Yes, I think so. It certainly focuses too much on obscure syntax details and for that reason I think the effort required comes close to out weighing the benefit. But any certification is only useful as a framework for learning and overall, I believe that SCJP is still useful for any Java developer to do – but only as a starting point. It definitely needs to be followed up with hands on experience and reading books such as Effective Java.

Leave a Reply