Thursday, April 10, 2008

Why Java is "the suck"

Look at this:
String.valueOf((new Integer((String) pageNumber)).intValue()+1)
Now ... constructs like this are so common in Java it's disgusting. Most of it is probably due to idiots like me who do not know what the "best practice" is for this, but please!

I'm sure if I was better with my EL, or wrote my Java code in XML, or just memorized a few more APIs, life would be easier, right?

Why is the world so tainted and ruined, and so irrepairably so?

Praise the Lord.

UPDATE: Derek Konigsberg noted that I do not need to create the interim Integer in the above code, but instead use static methods of the Integer class to achieve the same String.

1 comment:

Eolande said...

Thanks for writing this.