Hibernate have just released a migration guide for users going from version 2 to version 3. Probably a good read for anyone considering upgrading.
Monthly Archives: January 2005
Eclipse support for J2SE 5.0
Eclipse3.1 M4 supports J2SE5.0 and confirms when you create a project if you want to use Java 5.0 compliance.
This ia a welcome addition as Eclipse 3.0 only supports up to Java 1.4
J2SE New Features – Generics
J2SE 5.0 gives developers a whole load of new features – too many to list here, but a complete list is given at http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html
Generics is one of the best new features that has been added to J2SE 5.0 and they are incredibly easy to use! So what is Generics? Well, to put it simply, Generics gives you type safety on collections, so you can create collections that will only hold a specific type. Furthermore, when you get an object out of a collection using Generics, you don’t need to cast it to the relevent type – this is done automatically for you. This is best shown with a small example.
// Declare an array list called items that can only hold strings.
Collection<String> items = new ArrayList<String>();
// Add a couple of strings to the collection.
items.add("String 1");
items.add("String 2");
// Declare a 'String' iterator to loop through the collection.
Iterator<String> iter = items.iterator();
while (iter.hasNext()) {
// Get a value from the collection - note there is no need to cast it.
String value = iter.next();
System.out.println(value);
}
My First Post
Well, here it is, my first post.
Here are a few of my favourite sites (in no particular order):
- The Server Side
- JBoss
- CodeGuru