A Funny Java Flavoured Look at the World

Sunday, April 09, 2006

Hardest Java Exam Question - Java 1.5 or Java 1.4

I'm really getting a taste for writing about the Java 5 exam and I am trying to catch up on what I have done.

//Warning Rant iminent
I will firstly mention Suns naming conventions of Java, why did they call Java 1.4 - Java 2, if that is not bizarre enough they now call Java 1.5 - Java 5. No consistancy and whats the point in it.
//end of rant

One of the first decisions I had to make was which exam to go for. Do I go for the 1.4 or the 1.5 exam. The conundrum I had was I knew that if I decided to study for the new Java 1.5 (also called Java 5 stupid naming conventions at sun) I would have to learn all the new functionality because I hadn't used any of it because at the time I didn't even have Java 1.5 installed (just in case I accidentally used any of its functionality and then people who didn't have java 1.5 plugins wouldn't be able to use the code I had written).

In the end I decided to go for the new exam for the following reasons.

1. it would be a good opportunity to learn the new features put into the Java language
2. it would be more relevant/recent in years to come

Of course now that they are releasing 1.6 you wonder if its possible to keep up. The next question I had was I wonder what had changed between 1.4 and 1.5. I found this excellent summary no the Java Ranch (brilliant website by the way) This links explains what is new and gives some links where you can investigate the new features

http://www.javaranch.com/journal/200601/Journal200601.jsp#a6

These are what I think are the main new features and not just modifications

  • The For Each loop
  • Enums
  • Generics
  • Regular Expressions
  • Var-Args
  • formatting (printf c# functionality)
I really like Var-Args which is basically the ability to have any number of variables passed in at the end e.g. a number of String variables (which I think may be useful).

The For Each loop makes looping through a collection much easier and is a very easy win

Enum is good but when you read about all the things you can do with it, it blows your mind a bit but its a good solid standard way to implement constants and collections of constants.

Regular expression is a typical horrible thing you have to study for exams with many possibilities of confusing syntax which I am unlikely to use. I think that maybe one day I will be glad of the functionality but until that day it will for ever be a confusing exam beast.

Generics is an interesting piece of functionality and has seemingly caused lots of ranting and raving in many blogs. I am ambivalent to it really, I think its a good idea, it has been implemented a bit difficult but they had to make it backwards compatible. I'm sure the people complaining that its restrictive and the opposite of being Generic would have complained a lot more if Sun had not made it backward compatible. I think overall it achieves it's aim of compile time type safety.

Summary

Its interesting that the article states that there are 30 percent new material and a lot of it is pretty new, in which I mean its not like anything in the previous exam. This probably makes doing the 1.5 exam harder but I think that in the long term it will be more beneficial as you will be in a more select group and it will be more relevant in the future when the adoption of Java 5 (1.5) features are more widely adopted. It will of course importantly give you the right to tell any of your fellow workers who have passed the 1.4 exam that the new exam is much harder than the easy 1.4 exam.

The benefit that I have found studying for the 1.5 exam is that I have had the opportunity and reason to look and study the new functionality of Java 5, where as normally I would have only had a passing glance.

Hoskinator signing off

0 Comments:

Post a Comment

<< Home