Not only Windows knows its annoyances, also (or even Java) has a collection of those guys:
http://www.whysmalltalk.com/articles/weddle/annoyances.htm
To my humble opinion this list is far from complete.
The switch case statement is at least confusing, but certainly error-prone if by accident a break stament is missing in action.
And those bloody primitives!!!
And so on ...
And String is a pain in the ass.
See for instance this discussion about trimRight that is not a method of String: http://forum.java.sun.com/thread.jspa?threadID=465541&messageID=2140064
And the final solution:
public String trimRight(String input) {
return input.split("\\ *\\z")[0];
}
Feel free to add your annoyances to the list by means of your comment to this blog entry.
No comments:
Post a Comment