tag:blogger.com,1999:blog-5427069094580312550.post243891840000820090..comments2023-12-23T21:48:09.231-08:00Comments on Code To Joy: Thank You, Java 5Michael Easterhttp://www.blogger.com/profile/14799771593145201161noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5427069094580312550.post-25315735968412545312008-10-15T10:18:00.000-07:002008-10-15T10:18:00.000-07:00Annotation turns out to be the most excellent feat...Annotation turns out to be the most excellent feature of Java 5 . <BR/><BR/>Generics is pretty good, but not as expected. It falls into the Sun's infamous 'unnecessarily complicated' stuff, and the code might be messy. <BR/><BR/>Foreach style is nice, of course. <BR/><BR/><BR/>Will Dolphin recover some reputation for Sun ?Admin.Mediocre-Ninjahttps://www.blogger.com/profile/11478668482729947756noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-5054711663134973052008-10-07T16:31:00.000-07:002008-10-07T16:31:00.000-07:00Probably one of my favorite features of Java 5 is ...Probably one of my favorite features of Java 5 is the edition of annotations. Not only did it make my apps more useful, but it made my life immeasurably easier by enabling frameworks like XStream, JUnit 4, Guice, etc.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-37630959389424557912008-10-07T14:16:00.000-07:002008-10-07T14:16:00.000-07:00@Mark: Well, Java 1.4 reaches its EOL on October 3...@Mark: Well, Java 1.4 reaches its EOL on October 30. No more security patches/updates/etc. If a company has millions of dollars riding on stability, they shouldn't be using an EOLed platform.Joe Attardihttps://www.blogger.com/profile/14768726051631454126noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-83991538323240638592008-10-06T20:44:00.000-07:002008-10-06T20:44:00.000-07:00apart from the ones you mentioned I found a partic...apart from the ones you mentioned I found a particular feature of generics quite useful - bounded type parameters with multiple interfaces separated by &. <BR/><BR/>We used it a lot in one of our swing apps. Unfortunately I don't see many people mention this feature while talking about generics :(Shamshttps://www.blogger.com/profile/10301627897367423203noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-90000450690995815282008-10-06T16:30:00.000-07:002008-10-06T16:30:00.000-07:00My favourite Java 5 feature is variable arguments....My favourite Java 5 feature is variable arguments. Judicious use of them also gives code that "washed and waxed" feeling.Frank Carverhttps://www.blogger.com/profile/10122946282768021916noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-47836069372965065432008-10-06T15:42:00.000-07:002008-10-06T15:42:00.000-07:00@ Anon. Good point on the implicit iterator. We w...@ Anon. Good point on the implicit iterator. We were burned by that a couple of times.<BR/><BR/>@ Mark. I am not saying anyone is afraid or a luddite. The intent of this post is: if you haven't worked with Java 5, here are some features that I find useful, even though I originally wasn't enthused.<BR/><BR/>As Alex and others have pointed out, there are reasons people are still on Java 1.4. I'm not telling them to change "just because", or at all.<BR/><BR/>@ Martin. If possible, yes, a project should use Java 6. There are many aspects to Java 6 (and especially Java 5) beyond this post. Again, I'm just saying that I have come to appreciate the features described. I also think that the value of generics is often lost in the wave of (fair) criticism against the feature.Michael Easterhttps://www.blogger.com/profile/14799771593145201161noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-55117202103837756052008-10-06T14:20:00.000-07:002008-10-06T14:20:00.000-07:00I wonder why not praying for Java 6 - For desktop ...I wonder why not praying for Java 6 - For desktop applications there is for instance the tray notification icons and bubbles - just to mention something new.Martin Wildamhttps://www.blogger.com/profile/10078822365635360301noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-54240792761310665172008-10-06T14:00:00.000-07:002008-10-06T14:00:00.000-07:00Companies that haven't moved to Java 5 aren't stay...Companies that haven't moved to Java 5 aren't staying behind because they're luddites, afraid of new technology.<BR/><BR/>They have working systems running on Java 1.4, often with dependencies on specific versions of WebSphere or other libraries, and millions, often hundreds of millions, of dollars riding on the stability of their systems.<BR/><BR/>Changing Java version "just because", when the existing one works, is an irresponsible business practice.Mark Hugheshttps://www.blogger.com/profile/05325140104622317511noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-25244107618095047202008-10-06T08:24:00.000-07:002008-10-06T08:24:00.000-07:00The for loop has the unfortunate(?) effect of usin...The for loop has the unfortunate(?) effect of using iterators, and iterators fail fast, and THAT means that any modification, or QUERY (get) of a collection with a for loop is enough to fail at runtime. Sure it's a programmer error most times, but not always.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-10117728718701674682008-10-06T06:42:00.000-07:002008-10-06T06:42:00.000-07:00Sure, Java 5 brings a lot of cool stuff including ...Sure, Java 5 brings a lot of cool stuff including Enum, the concurrency library (huge), and other goodness.<BR/><BR/>This post talks about features which I didn't appreciate at first, but have come to respect in a profound way. I liked Enum from the start.Michael Easterhttps://www.blogger.com/profile/14799771593145201161noreply@blogger.comtag:blogger.com,1999:blog-5427069094580312550.post-1390087098516038222008-10-05T23:54:00.000-07:002008-10-05T23:54:00.000-07:00How can you leave out Enum? The amount of conditio...How can you leave out Enum? The amount of conditionals you can factor out by its strong typing way of associating data is remarkable and I have yet to see a project that didn't benefit from it.Casper Banghttps://www.blogger.com/profile/09493174484116672294noreply@blogger.com