A Funny Java Flavoured Look at the World

Sunday, April 23, 2006

Java 5 feature articles

I found an two articles summarising the new features in Java 1.5. This is decent document and it briefly explains what they all are and what they do. It's a very good introduction to the Java 5 features and are probably useful for people who are just about to start learning for their SCJP 5 Exam (CX-310-055) This list of the topics is of the information in the articles

Enhanced for loop
Annotations
Static imports
Variable-length arguments
Enums
Generics
Autoboxing

With the exception of Generics all the new features make programming in Java easier and I think there are some really good features. You wonder why they didn't add them in before.

I really like the Enhanced for Loop, it makes looping through collections much easier and for most scenerios brings about the death of the irerator.

Static imports are a bit of a wierd one, I don't think I have ever really written a class where I used a lot of Static classes, to the extent I wished I could import a class to save me typing its name. I actually think its a bit confusing for people looking at code with static imports because it's not obvious you are calling a method on a static class. I'm not a big fan of this one.

Variable-Length arguements (var args) I like this, the ability to have a number of variables of the same type.

http://www.theserverside.com/blogs/showblog.tss?id=JDK5Practice


The second article is written by Joshua Bloch and Neal Gafter
http://www.theserverside.com/blogs/showblog.tss?id=JDK15

I think the first article was written by Cedric Beust and Cedric is the creator
of TestNG, which is something on my to look at list

0 Comments:

Post a Comment

<< Home