Jan 02

While the Java community celebrates the release of JavaFX 1.0, two JSRs are striving to teach us again how to write Swing applications – this time, the easy way. JSR 295 addresses property manipulations and bindings, not just in the Swing framework but throughout the Java platform; JSR 296 simplifies Java application creation using Swing, bringing a “Swing for the rest of us” kind of approach.

In this post, I’ll discuss JSR 296 and what it brings, and my opinion of where it could be improved; in the followup post I’ll discuss JSR 295, and try to do the same for that. Continue reading »

  • Share/Bookmark
Dec 05

We all know the Java Collections Framework – Collection, List, Set, Map are used in almost every Java application. We also know that operator overloading in not available in Java, something that has caused a huge debate over the years, especially after C# came out and had it as a feature.

In fact, just today Daniel Pitts posted something about it under his “almost useful” tag. In that, he obviously mentions the convenient square brackets operator map[“key”] or list[1] where map is a Map instance and list is a List instance, of course. Continue reading »

  • Share/Bookmark
Sep 26

Not that I don’t understand the idea. It’s simple:

final map := new HashMap<String,List<Thing>>();

is equal to

final HashMap<String,List<Thing>> map =
new HashMap<String,List<Thing>>();

And who really wants that kind of line in their code, eh? Why write things twice, anyway?

The proposal in Neal’s blog is considerably sane too, because it offers a way to allow a developer to choose not to use type inference. Some people even offered generic-type inference according to the types passed to the constructor:
Continue reading »

  • Share/Bookmark

Chaotic Java is Digg proof thanks to caching by WP Super Cache